dm_json Module

Contains subroutines to convert derived types to JSON format.


Uses

  • module~~dm_json~~UsesGraph module~dm_json dm_json module~dm_dp dm_dp module~dm_json->module~dm_dp module~dm_error dm_error module~dm_json->module~dm_error module~dm_kind dm_kind module~dm_json->module~dm_kind module~dm_util dm_util module~dm_json->module~dm_util module~dm_dp->module~dm_error module~dm_dp->module~dm_kind module~dm_time dm_time module~dm_dp->module~dm_time module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_util->module~dm_error module~dm_util->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_time->module~dm_util

Used by

  • module~~dm_json~~UsedByGraph module~dm_json dm_json module~dm_geojson dm_geojson module~dm_geojson->module~dm_json module~dm_jsonl dm_jsonl module~dm_jsonl->module~dm_json module~dmpack dmpack module~dmpack->module~dm_json module~dmpack->module~dm_geojson module~dmpack->module~dm_jsonl

Interfaces

public interface dm_json_from

Generic derived type to JSON converter.

  • private function json_from_beat(beat) result(json)

    Returns beat in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(beat_type), intent(inout) :: beat

    Beat type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_beats(beats) result(json)

    Returns array of beats in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(beat_type), intent(inout) :: beats(:)

    Array of beat types.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_data_point(data_point) result(json)

    Returns data point in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(dp_type), intent(inout) :: data_point

    Data point type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_data_points(data_points) result(json)

    Returns array of data points in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(dp_type), intent(inout) :: data_points(:)

    Data points array.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_log(log) result(json)

    Returns log in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(log_type), intent(inout) :: log

    Log type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_logs(logs) result(json)

    Returns array of logs in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(log_type), intent(inout) :: logs(:)

    Array of log types.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_node(node) result(json)

    Returns node in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: node

    Node type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_nodes(nodes) result(json)

    Returns array of nodes in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: nodes(:)

    Array of node types.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_observ(observ) result(json)

    JSON encoding of given observation type (for poor people).

    Arguments

    Type IntentOptional Attributes Name
    type(observ_type), intent(inout) :: observ

    Observation data.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_observs(observs) result(json)

    Returns array of observations in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(observ_type), intent(inout) :: observs(:)

    Array of observations.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_sensor(sensor) result(json)

    Returns sensor in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensor

    Sensor type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_sensors(sensors) result(json)

    Returns array of sensors in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensors(:)

    Array of sensors.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

  • private function json_from_target(target) result(json)

    Returns target in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: target

    Sensor type.

    Return Value character(len=:), allocatable

    Alloctable JSON string.

  • private function json_from_targets(targets) result(json)

    Returns array of targets in JSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: targets(:)

    Array of targets.

    Return Value character(len=:), allocatable

    Allocatable JSON string.

public interface dm_json_write

Generic derived type to JSON writer.

  • private function json_write_beat(beat, unit) result(rc)

    Writes beat to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(beat_type), intent(inout) :: beat

    Beat type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_beats(beats, unit) result(rc)

    Writes beats to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(beat_type), intent(inout) :: beats(:)

    Beat array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_data_point(data_point, unit) result(rc)

    Writes data point to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(dp_type), intent(inout) :: data_point

    Data point type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_data_points(data_points, unit) result(rc)

    Writes data_points to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(dp_type), intent(inout) :: data_points(:)

    Data point array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_log(log, unit) result(rc)

    Writes log to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(log_type), intent(inout) :: log

    Log type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_logs(logs, unit) result(rc)

    Writes logs to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(log_type), intent(inout) :: logs(:)

    Log array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_node(node, unit) result(rc)

    Writes node to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: node

    Node type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_nodes(nodes, unit) result(rc)

    Writes nodes to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: nodes(:)

    Node array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_observ(observ, unit) result(rc)

    Writes observation to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(observ_type), intent(inout) :: observ

    Observation type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_observs(observs, unit) result(rc)

    Writes observations to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(observ_type), intent(inout) :: observs(:)

    Observation array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_sensor(sensor, unit) result(rc)

    Writes sensor to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensor

    Sensor type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_sensors(sensors, unit) result(rc)

    Writes sensors to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensors(:)

    Sensor array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_target(target, unit) result(rc)

    Writes target to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: target

    Target type.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer

  • private function json_write_targets(targets, unit) result(rc)

    Writes targets to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: targets(:)

    Target array.

    integer, intent(in), optional :: unit

    File unit.

    Return Value integer


Functions

public pure function dm_json_escape(str) result(esc)

Escapes passed character string by replacing each occurance of \ with \\.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

String to escape.

Return Value character(len=:), allocatable

Escaped string.