Re: [Lazarus] Convert record to JSON?

2018-07-22 Thread Sven Barth via Lazarus
Bo Berglund via Lazarus schrieb am So., 22. Juli 2018, 00:23: > And how do I "plug" the fpjson.helper.pp code into my project? > Simply add the unit to your project and use it where you use fpjsonrtti (in addition to that unit!). The methods are then part of TJSONStreamer and TJSONDeStreamer. T

Re: [Lazarus] Convert record to JSON?

2018-07-22 Thread Bo Berglund via Lazarus
On Sun, 22 Jul 2018 07:52:40 +0200 (CEST), Michael Van Canneyt via Lazarus wrote: >Only dynamic arrays can be published. > So I changed the declaration: TIpAddress = array of byte; Then added a constructor to the class where I set the length to 4: constructor TEspConfiguration.Create; begin

Re: [Lazarus] Convert record to JSON?

2018-07-22 Thread Michael Van Canneyt via Lazarus
On Sun, 22 Jul 2018, Bo Berglund via Lazarus wrote: On Sun, 22 Jul 2018 07:52:40 +0200 (CEST), Michael Van Canneyt via Lazarus wrote: Only dynamic arrays can be published. So I changed the declaration: TIpAddress = array of byte; Then added a constructor to the class where I set the len

Re: [Lazarus] Convert record to JSON?

2018-07-22 Thread Bo Berglund via Lazarus
On Sun, 22 Jul 2018 10:41:23 +0200 (CEST), Michael Van Canneyt via Lazarus wrote: >That is because you cannot pass the array as a var argument. Just remove the >var, for a dynamic array it is not required anyway. I did so and the compile error disappeared. However, now that there are no compile