FrameIT
JSONManager Class Reference

Classes

class  JsonInheritenceConverter
 
class  MMTDeclaration
 
class  MMTSymbolDeclaration
 
class  MMTTerm
 
class  MMTValueDeclaration
 
class  OMA
 
class  OMF
 
class  OMS
 
class  OMSTR
 
class  URI
 

Static Public Member Functions

static void WriteToJsonFile (string filePath, object objectToWrite, int max_depth=0)
 Writes the given object instance to a Json file, recursively to set depth, including all members. More...
 
static T ReadFromJsonFile< T > (string filePath)
 Reads an object instance from an Json file. More...
 

Static Public Attributes

static MMTURICollection MMTURIs = new MMTURICollection()
 

Member Function Documentation

◆ ReadFromJsonFile< T >()

static T JSONManager.ReadFromJsonFile< T > ( string  filePath)
static

Reads an object instance from an Json file.

Object type must have a parameterless constructor.

Template Parameters
TThe type of object to read from the file.
Parameters
filePathThe file path to read the object instance from.
Returns
Returns a new instance of the object read from the Json file.
Type Constraints
T :new() 

◆ WriteToJsonFile()

static void JSONManager.WriteToJsonFile ( string  filePath,
object  objectToWrite,
int  max_depth = 0 
)
static

Writes the given object instance to a Json file, recursively to set depth, including all members.

Object type must have a parameterless constructor.

Only All properties and variables will be written to the file. These can be any type though, even other non-abstract classes.

Parameters
filePathThe file path to write the object instance to.
objectToWriteThe object instance to write to the file.
max_depthThe depth recursion will occur. Default = 0.

Member Data Documentation

◆ MMTURIs

MMTURICollection JSONManager.MMTURIs = new MMTURICollection()
static

The documentation for this class was generated from the following file: