Winsoft JSON 3.8

Winsoft JSON 3.8
Winsoft JSON 3.8 | 5 Mb

full JSON supported: literals, numbers, strings, arrays and objects
date/time encoding and decoding supported
customizable output
supports Windows 32, Windows 64, macOS, iOS and Android
available for Delphi/C++ Builder 6 – 10.1 and Lazarus 1.6
source code included in full version
royalty free distribution in applications

Read and modify existing json files:
var Json: TJson;

with TJsonParser.Create do
try
  Json := ParseUtf8File('c:\data.json');
  try
    ShowMessage(Json.ToString);
  finally
    Json.Free;
  end;
finally
  Free;
end;
Create new json files:
var
  MyArray: TJsonArray;
  MyObject: TJsonObject;

with TJsonObject.Create do
try
  SetNull('Null');
  SetTrue('True');
  SetFalse('False');
  SetNumber('Number', 1.23);
  SetString('String', 'hello');
  SetDateTime('DateTime', Now);

  MyArray := SetArray('Array', 3);
  MyArray.SetString(0, 'First item');
  MyArray.SetString(1, 'Second item');
  MyArray.SetNumber(2, 3.21);

  MyObject := SetObject('Object');
  MyObject.SetString('First Member', 'Hello');
  MyObject.SetString('Second Member', 'World');
  MyObject.SetFalse('Third Member');
  MyObject.SetTrue('Fourth Member');
  MyObject.SetNumber('Other Member', 1.11);

  ShowMessage(ToString);
  ToUtf8File('c:\new.json');
finally
  Free;
end;
Use fast, streaming TJsonWriter to create json file without in-memory overhead of TJson objects:
with TJsonWriter.Create('c:\data.json') do
try
  BeginObject;
    WriteNull('Null');
    Write('True', True);
    Write('False', False);
    Write('Number', 1.23);
    Write('String', 'hello');
    Write('DateTime', Now, 0);

    BeginArray('Array');
      Write('First item');
      Write('Second item');
      Write(3.21);
    EndArray;

    BeginObject('Object');
      Write('First Member', 'Hello');
      Write('Second Member', 'World');
      Write('Third Member', False);
      Write('Fourth Member', True);
      Write('Other Member', 1.11);
    EndObject;
  EndObject;

  Check;
finally
  Free;
end;

 

supported, Windows, Lazarus, Builder, Delphi, available, source, included, applications, distribution, royalty, version, Android, macOS, objects, arrays, strings, numbers, encoding, decoding, Write, Member, MyObject, SetString, MyArray, Windows, Second, False, First, finally, Create, supported, dotry, SetNumber, Number, SetTrue, Winsoft, numbers, String, SetFalse

 

http://pasted.co/7a66be21

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s