Re: [fpc-pascal] Null values with JSON RPC

2020-08-10 Thread Joost van der Sluis
Op 08-08-2020 om 15:24 schreef Michael Van Canneyt: On Sat, 8 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 8, 2020, at 7:37 PM, Michael Van Canneyt wrote: Confirm there was an error. Fixed, and added testcase. I also added jdoNullClearsProperty; a null will then clear the property w

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Michael Van Canneyt
On Sat, 8 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 8, 2020, at 8:37 PM, Michael Van Canneyt wrote: I don't know, that depends on your system. It is the path where FPC is installed. It's the compiler path? This is the same errors I got before which made me rebuild the compile

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Ryan Joseph via fpc-pascal
> On Aug 8, 2020, at 8:37 PM, Michael Van Canneyt > wrote: > > I don't know, that depends on your system. It is the path where FPC is > installed. It's the compiler path? This is the same errors I got before which made me rebuild the compiler (macOS btw) packages$ sudo make clean make inst

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Michael Van Canneyt
On Sat, 8 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 8, 2020, at 8:24 PM, Michael Van Canneyt wrote: make clean make install PREFIX=/some/dir/on/your/system what is the PREFIX part? I don't know, that depends on your system. It is the path where FPC is installed. On my linux

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Ryan Joseph via fpc-pascal
> On Aug 8, 2020, at 8:24 PM, Michael Van Canneyt > wrote: > > make clean make install PREFIX=/some/dir/on/your/system what is the PREFIX part? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Michael Van Canneyt
On Sat, 8 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 8, 2020, at 7:37 PM, Michael Van Canneyt wrote: Confirm there was an error. Fixed, and added testcase. I also added jdoNullClearsProperty; a null will then clear the property with the 'natural' empty value. It has precedence ov

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Ryan Joseph via fpc-pascal
> On Aug 8, 2020, at 7:37 PM, Michael Van Canneyt > wrote: > > Confirm there was an error. Fixed, and added testcase. > > I also added jdoNullClearsProperty; a null will then clear the property with > the 'natural' empty value. It has precedence over jdoIgnoreNulls. Thanks again, I couldn't

Re: [fpc-pascal] Null values with JSON RPC

2020-08-08 Thread Michael Van Canneyt
On Sat, 8 Aug 2020, Ryan Joseph wrote: On Aug 7, 2020, at 9:09 PM, Michael Van Canneyt wrote: try B:=Not Assigned(FOnRestoreProp); I just rebuilt the compiler (couldn't figure out how to recompile just the fpc-json package) and got the new changes but there seems to be a regression a

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Ryan Joseph via fpc-pascal
> On Aug 7, 2020, at 9:09 PM, Michael Van Canneyt > wrote: > > try >B:=Not Assigned(FOnRestoreProp); I just rebuilt the compiler (couldn't figure out how to recompile just the fpc-json package) and got the new changes but there seems to be a regression and I'm not getting anything deser

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Michael Van Canneyt
On Fri, 7 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 7, 2020, at 8:31 PM, Michael Van Canneyt wrote: An option to allow nulls to be detected and handles would of course be a nice addition. For the time being, you can just set jdoIgnorePropertyErrors on the destreamer options.

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Ryan Joseph via fpc-pascal
> On Aug 7, 2020, at 8:31 PM, Michael Van Canneyt > wrote: > > An option to allow nulls to be detected and handles would of course be a nice > addition. > > For the time being, you can just set jdoIgnorePropertyErrors on the > destreamer options. Quick check right now and setting that optio

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Michael Van Canneyt
On Fri, 7 Aug 2020, Ryan Joseph via fpc-pascal wrote: On Aug 7, 2020, at 7:58 PM, Michael Van Canneyt wrote: By itself, fpJSON of course allows null values. What are you using as a serialization technologgy ? I didn't write the serialization layer and this is my first time using the FP

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Ryan Joseph via fpc-pascal
> On Aug 7, 2020, at 7:58 PM, Michael Van Canneyt > wrote: > > By itself, fpJSON of course allows null values. > > What are you using as a serialization technologgy ? I didn't write the serialization layer and this is my first time using the FPCs RTTI system for this purpose. Having said th

Re: [fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Michael Van Canneyt
On Fri, 7 Aug 2020, Ryan Joseph via fpc-pascal wrote: I'm trying to get the pascal language server working on Visual Studio Code and during testing I found that sending null values to the server is causing problems. i.e.: ... "processId": 3997, "clientInfo": { "name": "vscode",

[fpc-pascal] Null values with JSON RPC

2020-08-07 Thread Ryan Joseph via fpc-pascal
I'm trying to get the pascal language server working on Visual Studio Code and during testing I found that sending null values to the server is causing problems. i.e.: ... "processId": 3997, "clientInfo": { "name": "vscode", "version": "1.47.3" }, "rootPath": null