Skip to content

JSON results documentation #1207

Answered by mr-tz
brendonky18 asked this question in Q&A
Dec 1, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hey, I don't see more detailed documentation on this either, but the major change between v3 and v4 is the change from number-only based addresses, e.g. "base_address": 4194304, to more expressive/flexible addresses, e.g.:

"base_address":
{
    "type": "absolute",
    "value": 4194304
},

For the update we also switched to using a pydantic model. If you're processing the results that should simplify a few things. An example to load the stored results:

with open(capa_results.json, "rb") as f:
    doc = json.loads(f.read().decode("utf-8"))
res = rd.ResultDocument.parse_obj(results)

You can then access the result document fields like res.meta vs. the res["meta"] access before.

Does that help?…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@brendonky18
Comment options

@mr-tz
Comment options

mr-tz Dec 2, 2022
Maintainer

@brendonky18
Comment options

@mr-tz
Comment options

mr-tz Dec 2, 2022
Maintainer

Answer selected by brendonky18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants