Arcane  4.2.2.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::JSONDocument Class Reference

Management of a JSON document. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/JSONReader.h>

Collaboration diagram for Arcane::JSONDocument:

Classes

class  Impl

Public Types

enum  eParseFlag { ParseNoFlags = 0 , ParseCommentsFlag = 1 , ParseNumbersAsStringsFlag = 2 }

Public Member Functions

void parse (Span< const Byte > bytes, Int16 flags=ParseNoFlags)
 Reads the file in UTF-8 format.
void parse (Span< const std::byte > bytes, Int16 flags=ParseNoFlags)
 Reads the file in UTF-8 format.
void parse (Span< const Byte > bytes, StringView file_name, Int16 flags=ParseNoFlags)
 Reads the file in UTF-8 format.
void parse (Span< const std::byte > bytes, StringView file_name, Int16 flags=ParseNoFlags)
 Reads the file in UTF-8 format.
JSONValue root () const
 Root element.

Private Attributes

Implm_p = nullptr

Detailed Description

Management of a JSON document.

Warning
Internal API. Do not use outside of Arcane.

Definition at line 239 of file arccore/src/common/arccore/common/JSONReader.h.

Member Enumeration Documentation

◆ eParseFlag

Enumerator
ParseNoFlags 

No flags are set.

ParseCommentsFlag 

Allow one-line (//) and multi-line (/‍**/) comments.

ParseNumbersAsStringsFlag 

Parse all numbers (ints/doubles) as strings.

Definition at line 246 of file arccore/src/common/arccore/common/JSONReader.h.

Constructor & Destructor Documentation

◆ JSONDocument()

Arcane::JSONDocument::JSONDocument ( )

Definition at line 406 of file JSONReader.cc.

◆ ~JSONDocument()

Arcane::JSONDocument::~JSONDocument ( )

Definition at line 412 of file JSONReader.cc.

Member Function Documentation

◆ parse() [1/4]

void Arcane::JSONDocument::parse ( Span< const Byte > bytes,
Int16 flags = ParseNoFlags )

Reads the file in UTF-8 format.

Definition at line 517 of file JSONReader.cc.

References Arcane::asBytes(), and parse().

Referenced by Arcane::VariableIOReaderMng::_readMetaData(), Arcane::Application::initialize(), parse(), parse(), and parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse() [2/4]

void Arcane::JSONDocument::parse ( Span< const Byte > bytes,
StringView file_name,
Int16 flags = ParseNoFlags )

Reads the file in UTF-8 format.

Definition at line 526 of file JSONReader.cc.

References Arcane::asBytes(), and parse().

Here is the call graph for this function:

◆ parse() [3/4]

void Arcane::JSONDocument::parse ( Span< const std::byte > bytes,
Int16 flags = ParseNoFlags )

Reads the file in UTF-8 format.

Definition at line 508 of file JSONReader.cc.

References parse().

Here is the call graph for this function:

◆ parse() [4/4]

void Arcane::JSONDocument::parse ( Span< const std::byte > bytes,
StringView file_name,
Int16 flags = ParseNoFlags )

◆ root()

JSONValue Arcane::JSONDocument::root ( ) const

Root element.

Definition at line 535 of file JSONReader.cc.

Referenced by Arcane::VariableIOReaderMng::_readMetaData(), and Arcane::Application::initialize().

Here is the caller graph for this function:

Member Data Documentation

◆ m_p

Impl* Arcane::JSONDocument::m_p = nullptr
private

The documentation for this class was generated from the following files: