Recommendation of updating the documentation to include a more in-depth example. Especially focused on getting formats that are pandas friendly. Specifically one that deals with two scenarios.
json_normalize one would provide an example of how to connect to other functions in pandas
Getting things back to json format with the generator
Something like the following on the first one. The idea is to show that you can connect to other functions.
data_o = json_normalize(tree.execute("$.data.groups.*[@.type is 'object']"),'objectRules',['id'])
For the second one something like following which might go with a generalized improvement in documentation around the utils.
On the latter one it might be worth adding a function, just because it seems to take an extra step that I would run every time. Although the naming convention might be different. This is basically to deal with the generator. I know it's just two lines of code, but it seems like it would help make things a bit clearer to improve usability.
def objectpath_to_json(g):
d = utils.json_ext.dumps(g)
return json.loads(d)
BTW, the reason I ended up down this path is the py2JSON and printJSON weren't as helpful as I needed them for the things I needed.
Recommendation of updating the documentation to include a more in-depth example. Especially focused on getting formats that are pandas friendly. Specifically one that deals with two scenarios.
json_normalize
one would provide an example of how to connect to other functions in pandasSomething like the following on the first one. The idea is to show that you can connect to other functions.
data_o = json_normalize(tree.execute("$.data.groups.*[@.type is 'object']"),'objectRules',['id'])
For the second one something like following which might go with a generalized improvement in documentation around the utils.
On the latter one it might be worth adding a function, just because it seems to take an extra step that I would run every time. Although the naming convention might be different. This is basically to deal with the generator. I know it's just two lines of code, but it seems like it would help make things a bit clearer to improve usability.
BTW, the reason I ended up down this path is the py2JSON and printJSON weren't as helpful as I needed them for the things I needed.