Gets the state of the stack and all its documents.

Syntax

State = SRP_JsonX_State()

Returns

The SRP JsonX stack.

Remarks

SRP_JsonX_State gets the SRP JsonX stack in its current state as an @FM delimited array. Each field represents a document on the stack. The first field is the active document. Each document displays it's name, current element and the current element's type.

Examples

$insert SRPJSONX  

SRP_JsonX_Begin('FirstDoc', '{')
	SRP_JsonX_Begin('SecondDoc', '[')
		SRP_JsonX_Begin('ThirdDoc', '{')
			SRP_JsonX('employees', '[')
				SRP_JsonX('{')
					SRP_JsonX('firstname', 'John')
					SRP_JsonX('lastname', 'Doe')
					SRP_JsonX('age', 21)
				SRP_JsonX('}')
				SRP_JsonX('{')
					SRP_JsonX('firstname', 'Anna')
					SRP_JsonX('lastname', 'Smith')
					SRP_JsonX('age', 32)
					State = SRP_JsonX_State()
					debug
				SRP_JsonX('}')
				SRP_JsonX('{"firstname":"Peter", "lastname":"Jones", "age":43}')
			SRP_JsonX(']')
			SRP_JsonX('count', 4)
			SRP_JsonX('active', 1, 'Bool')
			SRP_JsonX('alwaysnull')
			SRP_JsonX('alwaysstring', 4.321, 'String')
		Json = SRP_JsonX_End('Pretty')
	SRP_JsonX_End()
SRP_JsonX_End()
  • No labels