12#ifndef ARCANE_UTILS_INTERNAL_JSONPROPERTYREADER_H
13#define ARCANE_UTILS_INTERNAL_JSONPROPERTYREADER_H
22#include "arccore/common/JSONReader.h"
23#include "arccore/common/internal/Property.h"
28namespace Arcane::properties
35class JSONPropertyReader
40 JSONPropertyReader(
JSONValue jv, T& instance)
42 , m_instance(instance)
55 if (child_value.
null())
57 s.setFromJSON(child_value, m_instance);
58 s.print(std::cout, m_instance);
71template <
typename T,
typename PropertyType = T>
inline void
74 const char* instance_property_name = PropertyType ::propertyClassName();
76 if (child_value.
null())
79 PropertyType ::applyPropertyVisitor(reader);
bool null() const
True if the node is null.
JSONValue child(StringView name) const
Child value with name name. Returns a null value if not found.
virtual String name() const =0
Property name.
Base class of a property typed by a class.
Base class of a typed visitor on a property.