Closed gavanderhoorn closed 2 years ago
I like it. Although I think I'd prefer ""
over ''
. It's closer to what you write in C. And "
seems more common in Lua too.
Also, should the strings have escape sequences? Otherwise you could get something like
my_field: "foo"bar"
which looks confusing.
I think I'd prefer
""
over''
.
ok, that's easily changed.
should the strings have escape sequences?
hm, maybe.
It'd make string_deserialize(..)
more expensive though, as I'd probably implement that with a search-replace.
I'm not sure I'd escape the string though. Unless it's part of the protocol spec, it smells like changing the data, which a dissector shouldn't really do I believe. Edit: although if you feel strongly about it, I'd be OK with it.
I'm not sure I'd escape the string though. Unless it's part of the protocol spec, it smells like changing the data, which a dissector shouldn't really do I believe. Edit: although if you feel strongly about it, I'd be OK with it.
No, I think you're right. It's best to not change the data.
As per subject.
A change I've had locally for some time now and thought I'd share.
I have quite some messages with empty strings, which, without quotes, looks rather odd:
with this change, that'd become:
Personally I like the fact it always quotes strings (ie: also when they're non-empty), but perhaps you don't. Could make it conditional, but that seems like a lot of overhead.