Recent

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

Prakash

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

KodeZwerg

  • Hero Member
  • *****
  • Posts: 968
  • 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 by KodeZwerg »

Renat.Su

  • Full Member
  • ***
  • Posts: 223
    • 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