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

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.

Detailed Description

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 parse(), parse(), and parse().

◆ 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().

◆ 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().

◆ 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.


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