I ran into what I think is an issue with serializeToJson the other day, namely it uses "isRWField" inside the loop over structure members. Presumably this is to avoid stuff that isn't really a member variable, but it seems to mean that if I pass a constant or immutable structure as the input to serializeToJson, it simple ignores all of the members (since "compiles(input.m = input.m) = false").

Is this a bug, or am I missing some sort of intended behaviour? I'm not sure I totally understand why a field being writeable is the criteria for serializing it, but assuming it is, perhaps it should instead be testing an Unqual!T version of the type or something instead?