该提问来源于开源项目:open-source-parsers/jsoncpp
Hi Chris, thanks so much for this, we're in the middle of re-working this because as you say the diff was just too massive when it got reviewed internally which is why we opted to remove it. Thanks so much for the comments above, we'll try as hard as possible to go in that direction; with regards to std::string in the API, for backward compatibility it's no issue hopefully because people will be using std::string with the standard allocator. What we're trying to do is use Value as the type and then have everywhere else SomeClass; what this means is that we're using typedef's from Value to dictate the usage of string everywhere else. At the moment we've left some as std::string still and not Value::String because we wondered whether for errors you'd like to have them a string still but were concerned that they could then contain errors with sensitive information.
On the numbers, yeah, I'd just wondered who would have secure numbers in JSON, there just isn't space in a number for it to be particularly sensitive but i guess you could have an array of numbers for example representing a password or key or ... so will have a good think about that too. I will need to have a careful think about the union and how it will be affected by using allocators.
We will hopefully get this finished by the end of the weekend to as you say work through the commits in a more structured approach.
Thanks a lot, christopher