Recent

Author Topic: JSON parser handler  (Read 314 times)

comdora

  • New Member
  • *
  • Posts: 19
JSON parser handler
« on: April 19, 2025, 06:35:11 pm »
Hi,
I am Delphi developer, but I would like to make some projects in Lazarus on Raspberry Pi (I do not have a lot experience in using Lazarus IDE). I have installed LazJWT and HashLib4Pascal, and just  tried to execute Demo project from LazJWT. But, " No JSON parser handler installed. Recompile your project with the jsonparser unit included."  Where and which unit I have to add?

Thanks in advance
Bojan

cdbc

  • Hero Member
  • *****
  • Posts: 2124
    • http://www.cdbc.dk
Re: JSON parser handler
« Reply #1 on: April 19, 2025, 06:39:19 pm »
Hi
A guess would say: 'FPJSONParser'.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

comdora

  • New Member
  • *
  • Posts: 19
Re: JSON parser handler
« Reply #2 on: April 19, 2025, 06:43:57 pm »
Thanks for the quick reply. Can you give me more precise instructions?
I'm using Lazarus version 2.2.6 + dfsg2-2 and FPC version 3.2.2.


comdora

  • New Member
  • *
  • Posts: 19
Re: JSON parser handler
« Reply #3 on: April 19, 2025, 06:54:50 pm »
OK. I solved problem.
Added jsonparser in uses list in the component source file.

Thanks,

cdbc

  • Hero Member
  • *****
  • Posts: 2124
    • http://www.cdbc.dk
Re: JSON parser handler
« Reply #4 on: April 19, 2025, 07:00:00 pm »
Hi
Whoaa... I'm not entirely sure, that the JSON units ship with 2.2.6...
Let me quickly check fpc 3.2.2...  Found it, in line 762 & 796 in 'fpjson.pp'.
So the unit to include is "uses ...,fpjson;"
...And I think you have to implement the handler yourself, if you want different behaviour than the default...
But hey, don't take my word for it, please check the sources yourself, just Ctrl + click on the unit-name...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

cdbc

  • Hero Member
  • *****
  • Posts: 2124
    • http://www.cdbc.dk
Re: JSON parser handler
« Reply #5 on: April 19, 2025, 07:01:19 pm »
Okidoki, you're quicker than me  :D
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

 

TinyPortal © 2005-2018