Serializer to produduce a JSON document from a TOML datastructure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(json_ser_config), | public | :: | config | = | json_ser_config() |
Configuration for serializer |
|
| integer, | public | :: | depth | = | 0 |
Current depth in the tree |
|
| character(len=:), | public, | allocatable | :: | output |
Output string |
Visit a TOML value
Visit a TOML value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(json_serializer), | intent(inout) | :: | self |
Instance of the JSON serializer |
||
| class(toml_value), | intent(inout) | :: | val |
TOML value to visit |
type, extends(toml_visitor) :: json_serializer !> Output string character(len=:), allocatable :: output !> Configuration for serializer type(json_ser_config) :: config = json_ser_config() !> Current depth in the tree integer :: depth = 0 contains !> Visit a TOML value procedure :: visit end type json_serializer