Recent

Author Topic: Convert custom class to json  (Read 329 times)

Prakash

  • Full Member
  • ***
  • Posts: 169
Convert custom class to json
« on: December 05, 2022, 07:09:20 pm »
How to convert custom class to json

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Convert custom class to json
« Reply #1 on: December 05, 2022, 07:17:58 pm »
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Renat.Su

  • Full Member
  • ***
  • Posts: 230
    • Renat.Su
Re: Convert custom class to json
« Reply #2 on: December 05, 2022, 07:19:48 pm »
Code: Pascal  [Select][+][-]
  1. JSONString := Streamer.ObjectToJSONString(o)
from fpjsonrtti unit
Look at https://wiki.lazarus.freepascal.org/Streaming_JSON

 

TinyPortal © 2005-2018