FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
Loading...
Searching...
No Matches
fdl_canonical.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024-present American Society Of Cinematographers
2// SPDX-License-Identifier: Apache-2.0
10#ifndef FDL_CANONICAL_INTERNAL_H
11#define FDL_CANONICAL_INTERNAL_H
12
13#include <jsoncons/json.hpp>
14#include <string>
15
16namespace fdl::detail {
17
18using ojson = jsoncons::ojson;
19
25ojson strip_nulls(const ojson& val);
26
36ojson reorder_object(const ojson& obj, const std::string& type_hint);
37
47char* node_to_canonical_json(const ojson* node, const std::string& type_hint, int indent);
48
49} // namespace fdl::detail
50
51#endif // FDL_CANONICAL_INTERNAL_H
jsoncons::ojson ojson
Alias for ordered JSON type.
Definition fdl_accessors_api.cpp:23
ojson strip_nulls(const ojson &val)
Strip null values recursively; empty arrays are preserved as [].
Definition fdl_canonical.cpp:132
char * node_to_canonical_json(const ojson *node, const std::string &type_hint, int indent)
Serialize an ojson node to canonical JSON: strip_nulls + reorder + format.
Definition fdl_canonical.cpp:237
ojson reorder_object(const ojson &obj, const std::string &type_hint)
Reorder an object's keys according to the specified type's canonical order.
Definition fdl_canonical.cpp:152