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"
30namespace Arcane::properties
37class JSONPropertyReader
42 JSONPropertyReader(
JSONValue jv, T& instance)
44 , m_instance(instance)
57 if (child_value.
null())
59 s.setFromJSON(child_value, m_instance);
60 s.print(std::cout, m_instance);
73template <
typename T,
typename PropertyType = T>
inline void
76 const char* instance_property_name = PropertyType ::propertyClassName();
78 if (child_value.
null())
81 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.