@@ -1444,21 +1444,32 @@ void SeriesInterface::openIteration( uint64_t index, Iteration iteration )
1444
1444
1445
1445
namespace
1446
1446
{
1447
- template < typename T >
1448
- void getJsonOption (
1449
- nlohmann::json const & config, std::string const & key, T & dest )
1450
- {
1451
- if ( config.contains ( key ) )
1447
+ template < typename From, typename Dest = From >
1448
+ void getJsonOption (
1449
+ json::TracingJSON & config, std::string const & key, Dest & dest )
1452
1450
{
1453
- dest = config.at ( key ).get < T >();
1451
+ if ( config.json ().contains ( key ) )
1452
+ {
1453
+ dest = config[ key ].json ().get < From >();
1454
+ }
1454
1455
}
1455
- }
1456
1456
1457
- void parseJsonOptions (
1458
- internal::SeriesData & series, nlohmann::json const & options )
1459
- {
1460
- getJsonOption ( options, " defer_iteration_parsing" , series.m_parseLazily );
1461
- }
1457
+ template < typename Dest = std::string >
1458
+ void getJsonOptionLowerCase (
1459
+ json::TracingJSON & config, std::string const & key, Dest & dest )
1460
+ {
1461
+ if ( config.json ().contains ( key ) )
1462
+ {
1463
+ dest = json::asLowerCaseStringDynamic ( config[ key ].json () );
1464
+ }
1465
+ }
1466
+
1467
+ void parseJsonOptions (
1468
+ internal::SeriesData & series, json::TracingJSON & options )
1469
+ {
1470
+ getJsonOption< bool >(
1471
+ options, " defer_iteration_parsing" , series.m_parseLazily );
1472
+ }
1462
1473
}
1463
1474
1464
1475
namespace internal
@@ -1473,7 +1484,7 @@ SeriesInternal::SeriesInternal(
1473
1484
static_cast < internal::SeriesData * >( this ),
1474
1485
static_cast < internal::AttributableData * >( this ) }
1475
1486
{
1476
- nlohmann::json optionsJson = json::parseOptions ( options, comm );
1487
+ json::TracingJSON optionsJson = json::parseOptions ( options, comm );
1477
1488
parseJsonOptions ( *this , optionsJson );
1478
1489
auto input = parseInput ( filepath );
1479
1490
auto handler = createIOHandler (
@@ -1488,7 +1499,7 @@ SeriesInternal::SeriesInternal(
1488
1499
static_cast < internal::SeriesData * >( this ),
1489
1500
static_cast < internal::AttributableData * >( this ) }
1490
1501
{
1491
- nlohmann::json optionsJson = json::parseOptions ( options );
1502
+ json::TracingJSON optionsJson = json::parseOptions ( options );
1492
1503
parseJsonOptions ( *this , optionsJson );
1493
1504
auto input = parseInput ( filepath );
1494
1505
auto handler = createIOHandler (
0 commit comments