问题标签 [podo]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1530 浏览

delphi - DataSnap "Plain Old Delphi Objects" and nested objects

A new article about DataSnap in Delphi XE explains that DataSnap now is able to transfer TObject-descendants between server and client, similar to the Java Enterprise Edition concept of POJO's ("Plain old Java objects").

Does this new feature work if such a PODO has a nested object-type properties which needs to be initialized, for example a TStrings property? Will all of these sub-objects be serialized and transferred with their current values? What about system resource properties, like TFileStream, THandle or TThread, which would make no sense in a serialized object, can these be tagged as 'not serializable'?


Some information is in the DocWiki, including this:

These are the fields for which there is already a built-in conversion/reversion: integer, string, char, enumeration, float, object, record. For the following types, the field values are ignored and user conversion is expected: set, method, variant, interface, pointer, dynArray, classRef, array.

0 投票
2 回答
3493 浏览

delphi - Delphi datasnap 回调 - 广播问题

我又遇到了一种情况,我花了很多时间来尝试根据我的需要自定义 datasnap 回调示例。我是老派 OOP 程序员,在我的“工具箱”PODO 样式中有几个非常大的对象层次结构 :-) .. 拥有这个出色的数据快照功能,我想利用回调的力量。

但是 - 当我实现它时......它只是失败了......(FASTMM4报告内存泄漏)。

尝试创建一个简单的 VCL 数据快照服务器 - TCP。并添加一个按钮和这个来源......

它会起作用-只要您继续使用 TJSONValue ...但是尝试切换注释的代码-您会明白我的意思。

我当然可以将所有现有代码更改为 JSON ......但这根本不可接受。

有谁知道如何使用 BroadcastOBJECT 或 NotifyOBJECT ?

问候 Bjarne

0 投票
0 回答
72 浏览

android - 如何从具有 2 个名称相同但颤动值不同的对象列表的 JSON 编写 PODO?

我正在尝试获取具有 2 个具有相同名称但具有不同值的列表对象的 JSON 对象。名为“items”的对象列表,第一个“items”有“products_title,product_image,link”,第二个“items”有“article_title,article_image,link”。如何编写 PODO ?

我一直在尝试编写 PODO,但即使我尝试更改模型,它仍然无法正常工作。我尝试了其他 REST API,例如“ https://jsonplaceholder.typicode.com/pothos ”它工作正常。但是如果我尝试使用我的 JSON 会出错,我想知道如何编写 PODO ?

这是我正在使用的 JSON:

}

0 投票
1 回答
50 浏览

json - 你如何迭代 Dart 中的对象列表到 Flutter 中的详细信息页面?

当我将 json 数据从列表解析到详细信息页面时,所有产品都会在详细信息页面中显示第一个产品详细信息。