FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Any way to know the current object being parsed? · Issue #134 · python-rapidjson/python-rapidjson · GitHub

Repository navigation

Any way to know the current object being parsed? #134

Description

Hi,
I am dealing with very large objects and potentially large arrays of stuff. I'm not sure if I can tell from start_object or end_object the name of the object that was being parsed. For instance, if start_object told me the name I could choose to ignore that name (by passing a dummy dictionary) rather than loading it into memory.

Take this for example:

{
  "hello": "world",
  "obj": {
    "obj_val": "first_obj_val",
    "obj_val2": "second_obj_val",
    "obj_val3": 3
  },
  "arr": [
    2, 4, 6, 8
  ]
}

I only get callbacks on start of the object (twice, but nothing telling me it is unnamed or called "obj"), the end of the "obj" and main object, the end of the "arr" array, and strings for "first_obj_val" and "second_obj_val". I wish I knew the keys / names for any of these.

For example, there's no way of knowing that "first_obj_val" refers to "obj_val" (or better yet, "obj.obj_val") until the very end.

Am I doing it wrong?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL