Skip to content

Invalid JSON values in pfj (show data using named format in JSON) #23986

@aviciano

Description

@aviciano

Environment

Thu Feb 20 13:22:51 CET 2025
radare2 5.9.9 38771 @ linux-x86-32
birth: git.5.9.8-386-g98490509b3 2025-02-20__13:19:59
commit: 98490509b386e4c14e8e11a786c4b72a919eaca9
options: gpl -O? cs:5 cl:2 make
Linux x86_64

Description

Nested array values formatted as 0x... which is an invalid JSON value

Test

r2 --
[0x00000000]> "td struct bar { uint32_t baz[1];}"
[0x00000000]> pf.foobarbaz ? (bar)foo
[0x00000000]> pfj foobarbaz

got

[{"name":"foo","type":"bar","offset":0,"value":[{"name":"baz","type":"d","offset":0,"value":[ 0xffffffff ]}]}]

expected

[{"name":"foo","type":"bar","offset":0,"value":[{"name":"baz","type":"d","offset":0,"value":[ 4294967295 ]}]}]

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