|
Globals Library 1.0
|
Data Types | |
| type | json_type |
| Derived data type to handle JSON data. More... | |
Functions/Subroutines | |
| subroutine | init_core (this) |
| Static constructor for internal JSON core settings. | |
| subroutine | throw_error (this) |
| Checks for parsing/runtime errors and raises Fortran exception. | |
| subroutine | init_empty (this) |
| Initialize the object as an empty JSON file/database. | |
| subroutine | init_string (this, str) |
| Initialize the object from a JSON string payload. | |
| subroutine | kill_json_type (this) |
| Destroys the JSON object and deallocates internal variables. | |
| subroutine | finalize_json_type (this) |
| Finalization routine triggered implicitly when object goes out of scope or is destroyed. | |
| subroutine | write_to_console (this) |
| Print the JSON object representation to standard output. | |
| subroutine | write_to_unit (this, iunit) |
| Print the JSON object representation to a specific formatted Fortran unit. | |
| subroutine | write_to_file (this, filename) |
| Save the JSON object representation directly to a file. | |
| subroutine | load_file_name (this, filename) |
| Construct a JSON structure from a JSON file path. | |
| logical function | check_path_is_valid (this, path) |
| Verify if a specific path exists within the JSON tree. | |
| subroutine | rename_path (this, path, new_name) |
| Rename a node located at the specified path. | |
| subroutine | remove_path (this, path) |
| Remove a node located at the specified path entirely. | |
| subroutine | set_object (this, path, value) |
| Append a deeply copied instance of another JSON object at path. | |
| subroutine | set_logical (this, path, value) |
| Setup a logical boolean value inside the JSON tree. | |
| subroutine | set_integer (this, path, value) |
| Setup an integer value inside the JSON tree. | |
| subroutine | set_real (this, path, value) |
| Setup a float literal (double precision) value into JSON tree. | |
| subroutine | set_string (this, path, value) |
| Setup a JSON string scalar property. | |
| subroutine | set_vec_logical (this, path, value) |
| Adds an array dimension of logic variables linearly. | |
| subroutine | set_vec_integer (this, path, value) |
| Adds an array block size containing integers to current root. | |
| subroutine | set_vec_real (this, path, value) |
| Adds an array literal values consisting of double precisions. | |
| subroutine | get_object (this, path, value) |
| Parses a subtree and clones its content into an alternative object variable. | |
| subroutine | get_integer (this, path, value, default) |
| Retrive integer primitive from loaded property tree. | |
| subroutine | get_real (this, path, value, default) |
| Retrieve floating point double sequence type variable. | |
| subroutine | get_logical (this, path, value, default) |
| Get a logical expression defined inside properties list mapping. | |
| subroutine | get_string (this, path, value, default) |
| Retrieve string character definitions loaded dynamically via parsed map length format. | |
| subroutine | get_vec_integer (this, path, value, default) |
| Parses target dynamically evaluated integer matrix structure hierarchy sequences. | |
| subroutine | get_vec_real (this, path, value, default) |
| Retrives continuous unmapped values sequence containing decimal arrays. | |
| subroutine | get_vec_logical (this, path, value, default) |
| Returns memory structure block sequences representing dynamically stored logic array data. | |
| subroutine | set_null_value (this, path) |
| Modifies payload hierarchy to explicitly associate a JSON null block. | |
| subroutine | set_vec_null_value (this, path, nvalues) |
| Evaluates an explicitly formatted sized array mapped block of JSON null components. | |
| subroutine | assign_json_type (this, other) |
| Prepares native assignments logic deeply copies mapping JSON representation states. | |
| subroutine jsondata::init_core | ( | class(json_type), intent(inout) | this | ) |
Static constructor for internal JSON core settings.
Sets the preferred configuration for json-fortran's core.
Definition at line 89 of file modJsonData.f90.
|
private |
Checks for parsing/runtime errors and raises Fortran exception.
If an error has been registered within the json_file instance, this subroutine throws a standard Fortran error stop with the message.
Definition at line 109 of file modJsonData.f90.
|
private |
Initialize the object as an empty JSON file/database.
Definition at line 123 of file modJsonData.f90.
|
private |
Initialize the object from a JSON string payload.
| [in] | str | character string payload in JSON format |
Definition at line 137 of file modJsonData.f90.
|
private |
Destroys the JSON object and deallocates internal variables.
Definition at line 151 of file modJsonData.f90.
|
private |
Finalization routine triggered implicitly when object goes out of scope or is destroyed.
Definition at line 164 of file modJsonData.f90.
|
private |
Print the JSON object representation to standard output.
Definition at line 175 of file modJsonData.f90.
|
private |
Print the JSON object representation to a specific formatted Fortran unit.
| [in] | iunit | integer, connected Fortran file unit |
Definition at line 190 of file modJsonData.f90.
|
private |
Save the JSON object representation directly to a file.
| [in] | filename | name of the output JSON file |
Definition at line 205 of file modJsonData.f90.
|
private |
Construct a JSON structure from a JSON file path.
| [in] | filename | path to the JSON file to parse |
Definition at line 220 of file modJsonData.f90.
|
private |
Verify if a specific path exists within the JSON tree.
| [in] | path | valid JSONPath style or key path |
Definition at line 236 of file modJsonData.f90.
|
private |
Rename a node located at the specified path.
| [in] | path | path to the node to rename |
| [in] | new_name | new string identifier for the node |
Definition at line 252 of file modJsonData.f90.
|
private |
Remove a node located at the specified path entirely.
| [in] | path | path to the node to remove |
Definition at line 274 of file modJsonData.f90.
|
private |
Append a deeply copied instance of another JSON object at path.
| [in] | path | path where the new object will be inserted |
| [in,out] | value | standard json_type object (content will be copied) |
Definition at line 290 of file modJsonData.f90.
|
private |
Setup a logical boolean value inside the JSON tree.
| [in] | path | target property path |
| [in] | value | target scalar array to map |
Definition at line 312 of file modJsonData.f90.
|
private |
Setup an integer value inside the JSON tree.
| [in] | path | target property path |
| [in] | value | target scalar to map |
Definition at line 329 of file modJsonData.f90.
|
private |
Setup a float literal (double precision) value into JSON tree.
| [in] | path | target property path |
| [in] | value | target scalar to map |
Definition at line 346 of file modJsonData.f90.
|
private |
Setup a JSON string scalar property.
| [in] | path | target property path |
| [in] | value | character string to add |
Definition at line 363 of file modJsonData.f90.
|
private |
Adds an array dimension of logic variables linearly.
| [in] | path | target property path |
| [in] | value | logical dimension 1 vector mapping |
Definition at line 380 of file modJsonData.f90.
|
private |
Adds an array block size containing integers to current root.
| [in] | path | target property path |
| [in] | value | integer target dimensions to add |
Definition at line 397 of file modJsonData.f90.
|
private |
Adds an array literal values consisting of double precisions.
| [in] | path | target property path |
| [in] | value | sequence representing float point doubles |
Definition at line 414 of file modJsonData.f90.
|
private |
Parses a subtree and clones its content into an alternative object variable.
| [in] | path | json path identifier to load the object hierarchy |
| [in,out] | value | distinct json_type object constructed from that path copy |
Definition at line 433 of file modJsonData.f90.
|
private |
Retrive integer primitive from loaded property tree.
| [in] | path | integer json path target to retrieve |
| [out] | value | output mapped variable memory target |
| [in] | default | integer default backup variable if path does not exist |
Definition at line 458 of file modJsonData.f90.
|
private |
Retrieve floating point double sequence type variable.
| [in] | path | target search index representing object floating node |
| [out] | value | output double float mapped variable target |
| [in] | default | double precision backup variable definition |
Definition at line 477 of file modJsonData.f90.
|
private |
Get a logical expression defined inside properties list mapping.
| [in] | path | structural map defining where local var resides |
| [out] | value | mapping output variable allocation logic |
| [in] | default | literal substitution default sequence expression |
Definition at line 496 of file modJsonData.f90.
|
private |
Retrieve string character definitions loaded dynamically via parsed map length format.
| [in] | path | mapping representation block identifier parameter |
| [out] | value | explicit allocation string containing sequence variable loaded |
| [in] | default | base case default string text returned as alternative definition structure |
Definition at line 518 of file modJsonData.f90.
|
private |
Parses target dynamically evaluated integer matrix structure hierarchy sequences.
| [in] | path | json-fortran query pointer representing valid location definitions array |
| [out] | value | parsed output list of dynamically typed integers map |
| [in] | default | alternative list sequence to bypass failing load tree elements logic structure |
Definition at line 540 of file modJsonData.f90.
|
private |
Retrives continuous unmapped values sequence containing decimal arrays.
| [in] | path | standard map search component path lookup identifier map sequence |
| [out] | value | mapped data payload holding dynamic floating sequences size allocation |
| [in] | default | definition array fallback defaults representation |
Definition at line 562 of file modJsonData.f90.
|
private |
Returns memory structure block sequences representing dynamically stored logic array data.
| [in] | path | base location directory to find boolean maps vector |
| [out] | value | memory structure to assign found array boolean literals map dynamically |
| [in] | default | precomputed defaults mapping fallback sequence vector structure list |
Definition at line 584 of file modJsonData.f90.
|
private |
Modifies payload hierarchy to explicitly associate a JSON null block.
| [in] | path | JSON property where null literal representation is added mapping identifier sequence |
Definition at line 603 of file modJsonData.f90.
|
private |
Evaluates an explicitly formatted sized array mapped block of JSON null components.
| [in] | path | directory sequence pointer map parameter reference string identifier |
| [in] | nvalues | amount of mapped identical logical NULL array sequence size representation vector |
Definition at line 622 of file modJsonData.f90.
|
private |
Prepares native assignments logic deeply copies mapping JSON representation states.
| [in] | other | representation data map wrapper struct source variable reference structure target |
Definition at line 640 of file modJsonData.f90.