Re: [PATCH v2 4/4] tests: virjson: Test string escaping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 19, 2017 at 09:08:16 -0400, John Ferlan wrote:
> 
> 
> On 07/11/2017 08:56 AM, Peter Krempa wrote:
> > Make sure that JSON strings can contain characters which need to be
> > escaped (double quotes, backslashes, tabs, etc.) and that JSON objects
> > formatted into strings can be nested into strings.
> > ---
> >  tests/virjsontest.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 66 insertions(+)
> > 
> 
> Seems there should be two separate patches here, one that ensures
> escaped strings work for DO_TEST_PARSE and the other passing/using a

Okay I'll split it and resend.

> nested string obj. Is "EscapeObj" even a right name, seems like
> "NestedObj" would be more appropriate. Is there some sort of escaping in
> the strings that I'm missing?

The naming issue is somewhere between those two, since you can nest JSON
naturally, but nesting a json string in a json value is what we are
tesing here.

> 
> Also, w/r/t escaping do we need handle double commas ",," that are
> supposed to turn into "," ?

Commas? Aren't you confusing this with escaping for qemu? JSON escaping
rules don't have anything special for commas since the escaping needs
to be done only if you want to store a JSON string into another JSON
string. Commas are not interpreted inside of strings.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux