Cleanup JSON output#288
Open
daanboer wants to merge 7 commits into
Open
Conversation
Use objects instead of nested arrays. This greatly improves the practical ease-of-use of the JSON output.
Use an object instead of an array of objects.
Use an array of objects, instead of nested arrays. Use camelCase for properties.
The array is stored in the top-level `data` property. Each element of the array is an object that contains all the data for that cycle. Previously the data would be stored in an object property using a key name with shape `reducedField_<value>`, which is quite unergonomic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleans up most of the JSON output. The output used a lot of nested arrays and arrays of objects in places where a simple object is a lot more suitable.
power_balance,swarm_parameters, andrate_coefficientssections are updated. Thelookup_tablesection is left as is. In fact thelookup_tablesection is rather superfluous and IMO does not make much sense in the JSON format sow we might want to remove it.camelCasenotation.dataproperty. The value of the electric field can simply be read from theswarmParameterssection. Previously, each cycle would presented as the value of a property in the top-level dictionary with key formatreducedField_<value>, which was rather unpractical to use.Resolves #217