Records

Functions

  • fit::result<InitSchemaError, rapidjson::SchemaDocument> InitSchema (std::string_view json)

    Build a SchemaDocument from a json encoded string.

    Defined at line 23 of file ../../src/lib/json_parser/rapidjson_validation.cc

  • template <typename T>
    std::string JsonValueToString (const T & v)

    Helper function to convert the given JsonValue to a string. Note that a

    JsonDoc is also a JsonValue.

    Defined at line 29 of file ../../src/lib/json_parser/pretty_print.h

  • fit::result<std::string> ValidateSchema (const rapidjson::Value & value, const rapidjson::SchemaDocument & schema, std::string_view value_name)

    Validate that the given json value match the given schema.

    Returns validation error on error.

    Defined at line 33 of file ../../src/lib/json_parser/rapidjson_validation.cc

  • bool ParseJson (std::string_view json, rapidjson::Document * document)

    Defined at line 37 of file ../../src/lib/json_parser/rapidjson_validation_unittest.cc

  • template <typename T>
    std::string JsonValueToPrettyString (const T & v)

    Like above, but pretty prints the string.

    Defined at line 38 of file ../../src/lib/json_parser/pretty_print.h

  • std::string PrettyPrintPath (const std::vector<std::string> & path)

    Take a vector of std::string and convert it to "/a/b/c" form for display.

    For debugging/logging purposes only

    Defined at line 47 of file ../../src/lib/json_parser/pretty_print.h