> On Oct. 16, 2014, 1:32 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp, line 377
> > <https://reviews.apache.org/r/26723/diff/2/?file=722346#file722346line377>
> >
> >     It looks like this could have been a one line change..?
> >     
> >     ```
> >     // We need to ensure the key is escaped by wrapping it in a String.
> >     out << "\"" << String((*iterator).first) << "\":" << (*iterator).second;
> >     ```

I can switch to doing that (Although as you wrote there will be two sets of 
quotes). It will cause additional string copies (Probably not the end of the 
world perfwise at the moment).

I thought about storing the keys in the Object map as a String, but that 
results in a very large code diff.


- Cody


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26723/#review56857
-----------------------------------------------------------


On Oct. 15, 2014, 6 p.m., Cody Maloney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26723/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2014, 6 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-1878
>     https://issues.apache.org/jira/browse/MESOS-1878
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> All strings in JSON need to be escaped, including the keys in dictionaries / 
> objects.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp 
> 719aa964a536cf02dbd2de440157de487ec703b1 
> 
> Diff: https://reviews.apache.org/r/26723/diff/
> 
> 
> Testing
> -------
> 
> make distcheck
> 
> 
> Thanks,
> 
> Cody Maloney
> 
>

Reply via email to