Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Conversation

@CaFlow
Copy link

@CaFlow CaFlow commented Jan 27, 2020

Have added a method named Spark as it is like the Spark Convention.This is similar to the Parker method except that this method takes and extra list parameter 'single_element_array_tags'. Specified tags in this list are formatted in the json as single element arrays if there is only one child.
After importing the required modules we can call this method as:
formatted_json = dumps(spark.data(fromstring(''), preserve_root=True, single_element_array_tags=['<tag 1>','<tag 2>']), sort_keys=True, indent=4)

@CaFlow CaFlow requested a review from sanand0 January 28, 2020 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant