Skip to content

Latest commit

 

History

History

JsonStthm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

JsonStthm

Fast Json reader/writer

How to use it

Read json file

#include "JsonStthm.h"

JsonStthm::JsonValue oJson;
oJson.ReadFile("data.json");

// Or (faster but read only)
JsonStthm::JsonDoc oJson;
oJson.ReadFile("data.json");

Create json

#include "JsonStthm.h"

JsonStthm::JsonValue oValue;
JsonStthm::JsonValue& oArray = oValue["myArray"];
oArray[0] = "test";
oArray[1] = false;
oArray[2] = 3.14159265359f;
  
JsonStthm::String sOut;
oValue.WriteString(sOut);

Content of sOut

{
	"myArray": [
		"test",
		false,
		3.1415927410125732
	]
}