Skip to content

Instantly share code, notes, and snippets.

@shreyasms17
Last active May 1, 2021 07:53
Show Gist options
  • Save shreyasms17/979a8bf3664cfb2fb88f6053ff337f54 to your computer and use it in GitHub Desktop.
Save shreyasms17/979a8bf3664cfb2fb88f6053ff337f54 to your computer and use it in GitHub Desktop.
AutoFlatten get_fields_in_json
def get_fields_in_json(self, json_schema):
'''
Description:
This function takes in the schema in json format and returns the metadata of the schema
:param json_schema: [type : str] a string containing path to raw data
:return fields: [type : dict] contains metadata of the schema
'''
a = json_schema.json()
schema_dict = json.loads(a)
fields = schema_dict['fields']
return fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment