areas.cpp
/*
  Convert this Areas object, and all its containing Area instances, and
  the Measure instances within those, to JSON strings.

  (https://github.com/nlohmann/json) for more info.
  
  @return
    std::string of JSON

  @example
    InputFile input("data/popu1009.json");
    auto is = input.open();

    auto cols = InputFiles::DATASETS["popden"].COLS;

    auto areasFilter = BethYw::parseAreasArg();
    auto measuresFilter = BethYw::parseMeasuresArg();
    auto yearsFilter = BethYw::parseMeasuresArg();

    Areas data = Areas();
    std::cout << data.toJSON();
*/
Convert this Areas object, and all its containing Area instances, and
the Measure instances within those, to JSON strings.

for more info.
Convert this Areas object and all its containing Area instances and the Measure instances within those to JSON strings . for more info .
std::string Areas::toJSON() const {
   if(size() == 0)
       return "{}";
   json j;
  for (auto const& area : areas)
      j[area.second.getLocalAuthorityCode()] = json::parse(area.second.toJSON());
  return j.dump();
}
std :: string Areas :: toJSON ( ) const { if ( size ( ) == 0 ) return " " ; json j ; for ( auto const & area : areas ) j [ area . second . getLocalAuthorityCode ( ) ] = json :: parse ( area . second . toJSON ( ) ) ; return j . dump ( ) ; }
Convert this Areas object, and all its containing Area instances, and
the Measure instances within those, to JSON strings.
Convert this Areas object and all its containing Area instances and the Measure instances within those to JSON strings .