kazuho / picojson

a header-file-only, JSON parser serializer in C++
BSD 2-Clause "Simplified" License
1.12k stars 221 forks source link

do "explicit" is needed in the constructor ? #76

Closed satoren closed 8 years ago

satoren commented 9 years ago

if exclude "explicit" from constructors,can write like below in C++11.

picojson::value a = picojson::array{3LL, "v", 3.0, 4.0, "test", false, true};

picojson::value o = picojson::object{ 
  { "a","value" },
  { "b",false },
  { "c",445.0 },
  { "d","text" },
  {"array", picojson::array{3LL, "v", 23.0, 4.0, "test", false, true} },
  {"child", picojson::object{{"key","value"}}},
  };