Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical(kind=LK), | intent(in), | optional | :: | verbose | mainly useful for debugging (default is false) |
|
logical(kind=LK), | intent(in), | optional | :: | compact_reals | to compact the real number strings for output (default is true) |
|
logical(kind=LK), | intent(in), | optional | :: | print_signs | always print numeric sign (default is false) |
|
character(kind=CDK,len=*), | intent(in), | optional | :: | real_format | Real number format: 'E' [default], '*', 'G', 'EN', or 'ES' |
|
integer(kind=IK), | intent(in), | optional | :: | spaces_per_tab | number of spaces per tab for indenting (default is 2) |
|
logical(kind=LK), | intent(in), | optional | :: | strict_type_checking | if true, no integer, double, or logical type
conversions are done for the |
|
logical(kind=LK), | intent(in), | optional | :: | trailing_spaces_significant | for name and path comparisons, is trailing space to be considered significant. |
|
logical(kind=LK), | intent(in), | optional | :: | case_sensitive_keys | for name and path comparisons, are they case sensitive. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | object or array JSON data |
|
integer(kind=IK), | intent(in) | :: | idx | index of the child |
||
type(json_value), | , | pointer | :: | child | pointer to the child |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | object or array JSON data |
|
type(json_value), | , | pointer | :: | child | pointer to the child |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | the name of a child of |
||
type(json_value), | , | pointer | :: | child | pointer to the child |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
type(json_value), | , | pointer | :: | member | the child member to add |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
integer(kind=IK), | intent(in) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | name of the variable |
||
integer(kind=IK), | intent(in), | dimension(:) | :: | val | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | variable name |
||
real(kind=RK), | intent(in) | :: | val | real value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
real(kind=RK), | intent(in), | dimension(:) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | name of the variable |
||
logical(kind=LK), | intent(in) | :: | val | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | name of the vector |
||
logical(kind=LK), | intent(in), | dimension(:) | :: | val | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | name of the variable |
||
character(kind=CK,len=*), | intent(in) | :: | val | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | variable name |
||
character(kind=CK,len=*), | intent(in), | dimension(:) | :: | val | array of strings |
|
logical(kind=LK), | intent(in), | optional | :: | trim_str | if TRIM() should be called for each element |
|
logical(kind=LK), | intent(in), | optional | :: | adjustl_str | if ADJUSTL() should be called for each element |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
logical(kind=LK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
real(kind=RK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
integer(kind=IK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
character(kind=CK,len=*), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | a JSON linked list |
|
character(kind=CK,len=*), | intent(in) | :: | path | path to the variable |
||
type(json_value), | intent(out), | pointer | :: | p | pointer to the variable specify by |
|
logical(kind=LK), | intent(out), | optional | :: | found | true if it was found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
integer(kind=IK), | intent(out) | :: | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
integer(kind=IK), | intent(out) | :: | value | |||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
integer(kind=IK), | intent(out), | dimension(:), allocatable | :: | vec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
integer(kind=IK), | intent(out), | dimension(:), allocatable | :: | vec | ||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
real(kind=RK), | intent(out) | :: | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
real(kind=RK), | intent(out) | :: | value | |||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
real(kind=RK), | intent(out), | dimension(:), allocatable | :: | vec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
real(kind=RK), | intent(out), | dimension(:), allocatable | :: | vec | ||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
logical(kind=LK) | :: | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
logical(kind=LK) | :: | value | ||||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
logical(kind=LK), | intent(out), | dimension(:), allocatable | :: | vec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
logical(kind=LK), | intent(out), | dimension(:), allocatable | :: | vec | ||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=:), | intent(out), | allocatable | :: | value |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
character(kind=CK,len=:), | intent(out), | allocatable | :: | value | ||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(out), | dimension(:), allocatable | :: | vec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
character(kind=CK,len=*), | intent(out), | dimension(:), allocatable | :: | vec | ||
logical(kind=LK), | intent(out), | optional | :: | found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
procedure(array_callback_func) | :: | array_callback |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | path | |||
procedure(array_callback_func) | :: | array_callback | ||||
logical(kind=LK), | intent(out), | optional | :: | found |
Print the json_value structure to an allocatable string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
character(kind=CK,len=:), | intent(out), | allocatable | :: | str | prints structure to this string |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
integer(kind=IK), | intent(in) | :: | iunit | the file unit (the file must already have been opened, can't be -1). |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
character(kind=CDK,len=*), | intent(in) | :: | filename | the filename to print to (should not already be open) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | variable to destroy |
|
logical(kind=LK), | intent(in), | optional | :: | destroy_next | if true, then |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(out) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
real(kind=RK), | intent(in) | :: | val | |||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | val | |||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
integer(kind=IK), | intent(in) | :: | val | |||
character(kind=CK,len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
logical(kind=LK), | intent(in) | :: | val | variable value |
||
character(kind=CK,len=*), | intent(in) | :: | name | variable name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
character(kind=CDK,len=*), | intent(in) | :: | file | JSON file name |
||
type(json_value), | , | pointer | :: | p | output structure |
|
integer(kind=IK), | intent(in), | optional | :: | unit | file unit number (/= 0) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | output structure |
|
character(kind=CK,len=*), | intent(in) | :: | str | string with JSON data |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
character(kind=CK,len=*), | intent(in) | :: | msg | the error message |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | new variable name |
Remove a json_value from a linked-list structure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
logical(kind=LK), | intent(in), | optional | :: | destroy | If destroy is not present, it is also destroyed. If destroy is present and true, it is destroyed. If destroy is present and false, it is not destroyed. |
check for error and get error message
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
logical(kind=LK), | intent(out) | :: | status_ok | true if there were no errors |
||
character(kind=CK,len=:), | intent(out), | allocatable | :: | error_msg | the error message (if there were errors) |
clear exceptions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json |
count the number of children
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p |
number of children
clone a JSON structure (deep copy)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | from | this is the structure to clone |
|
type(json_value), | , | pointer | :: | to | the clone is put here (it must not already be associated) |
check for error
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(in) | :: | json |
will be true if an exception has been thrown.
get pointer to json_value parent
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | JSON object |
|
type(json_value), | intent(out), | pointer | :: | parent | pointer to parent |
get pointer to json_value next
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | JSON object |
|
type(json_value), | intent(out), | pointer | :: | next | pointer to next |
get pointer to json_value previous
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | JSON object |
|
type(json_value), | intent(out), | pointer | :: | previous | pointer to previous |
get pointer to json_value tail
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | JSON object |
|
type(json_value), | intent(out), | pointer | :: | tail | pointer to tail |
get info about a json_value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p | ||
integer(kind=IK), | intent(out), | optional | :: | var_type | variable type |
|
integer(kind=IK), | intent(out), | optional | :: | n_children | number of children |
|
character(kind=CK,len=:), | intent(out), | optional | allocatable | :: | name | variable name |
to initialize some parsing parameters
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
logical(kind=LK), | intent(in), | optional | :: | verbose | mainly useful for debugging (default is false) |
|
logical(kind=LK), | intent(in), | optional | :: | compact_reals | to compact the real number strings for output (default is true) |
|
logical(kind=LK), | intent(in), | optional | :: | print_signs | always print numeric sign (default is false) |
|
character(kind=CDK,len=*), | intent(in), | optional | :: | real_format | Real number format: 'E' [default], '*', 'G', 'EN', or 'ES' |
|
integer(kind=IK), | intent(in), | optional | :: | spaces_per_tab | number of spaces per tab for indenting (default is 2) |
|
logical(kind=LK), | intent(in), | optional | :: | strict_type_checking | if true, no integer, double, or logical type
conversions are done for the |
|
logical(kind=LK), | intent(in), | optional | :: | trailing_spaces_significant | for name and path comparisons, is trailing space to be considered significant. |
|
logical(kind=LK), | intent(in), | optional | :: | case_sensitive_keys | for name and path comparisons, are they case sensitive. |
to traverse all elements of a JSON structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
procedure(traverse_callback_func) | :: | traverse_callback |
simply routine to print error messages
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
integer, | intent(in), | optional | :: | io_unit |
Swap two json_value pointers in a structure (or two different structures).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p1 | ||
type(json_value), | , | pointer | :: | p2 |
Check if a json_value is a child of another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | , | pointer | :: | p1 | ||
type(json_value), | , | pointer | :: | p2 |
Check that a json_value linked list is valid (i.e., is properly constructed). This may be useful if it has been constructed externally.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
logical(kind=LK), | intent(out) | :: | is_valid | True if the structure is valid. |
||
character(kind=CK,len=:), | , | allocatable | :: | error_msg | if not valid, this will contain a description of the problem |