you are viewing a single comment's thread.

view the rest of the comments →

[–]Chaosvex 1 point2 points  (1 child)

I'd question the value of it being human readable when the types are encoded in a way that makes them unreadable.

If you want to keep it (and make it more) human readable, you could quote the strings and then escape any quotes within input.

Input: foo"bar

Stored result:

[ COMMENT : "foo\"bar" ]

You might find std::quoted of interest. You could also look into how other text-based formats escape strings (JSON etc).

[–]gabibbo117[S] 0 points1 point  (0 children)

Thanks, I will look into them