Closed ayoubserti closed 7 years ago
The Json type is immutable by design, so we don't want to add those methods. You can use a Json::object (typedef for a map) directly for mutating, and then build the final Json object after you're done. If you want something with more features than that, I think you'd want some sort of a separate JsonBuilder type.
I would like to have [] no const accessor to override existing element. Also it will be nice to have Json::AddElement to make it possible to add new element into Object/Array