PSJ. - JSON Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > JSON - Parser > Parser-Operations > !Library State and Settings >

PSJ. - JSON Operations

PSJ.Reset

PreviousTopNext


SPR Script Language

 

PSJ.Reset

Resets the JSON library state, clearing all nodes and documents.

 

Intention

 

The PSJ.Reset command in SPR resets the JSON library, clearing all existing nodes and documents from memory. This command takes no parameters and is used to restore the JSON system to a clean state, typically at the start of a new operation or to free up resources after processing.

 

For example, after working with multiple JSON documents, calling PSJ.Reset ensures all previous data is cleared, preparing the system for fresh input.

 

Illustration

📝 Reset JSON State: PSJ.Reset clears all JSON nodes and documents from memory.

 

Syntax

 

PSJ.Reset

 

Parameter Explanation

 

This command takes no parameters.

 

Examples

 

'***********************************

' Sample 1: Reset JSON Library

PSJ.Reset

' Clears all JSON nodes and documents

MBX.JSON library reset complete

'***********************************

 

Remarks

 

- Clears all document handles, nodes, and associated memory used by the JSON library.

- No return value is provided; the operation is assumed to succeed unless an internal error occurs.

- After this command, all previous document handles and node IDs become invalid.

 

Limitations

 

- Does not accept parameters; any additional arguments result in an error.

- Cannot be undone; all JSON data is permanently cleared.

 

See also:

 

PSJ.Parse

PSJ.LoadFile