Skip to content

JSON not formatted anymore #1204

Answered by Robadob
bytetec asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

This does appear to be a bug. As noted in #1205, when JSONStateWriter was overhauled to allow partial agent state to be exported the handling of RapidJSON's Writer/PrettyWriter was changed from using templating to C++ inheritance.

However it appears, although PrettyWriter is a subclass of Writer it's methods are none-virtual. What this means is that if we cast a PrettyWriter* to Writer* and use the writing methods, they are not forwarded to the PrettyWriter subclass.

Thanks for spotting it, our test suite doesn't currently test the status of output files for the pretty print setting being observed.

It's low priority and a bit of a grim fix. I've not formally got any time allocated for…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by bytetec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants