Skip to content

Improve formatting of JSON output#8

Open
tortis wants to merge 1 commit intooom-dumpfrom
better-json-formatting
Open

Improve formatting of JSON output#8
tortis wants to merge 1 commit intooom-dumpfrom
better-json-formatting

Conversation

@tortis
Copy link
Owner

@tortis tortis commented Mar 27, 2022

Before

{
  "header" : {
    "memory_usage" : 132393720,
    "memory_usage_real" : 134217728,
    "peak_memory_usage" : 132393976,
    "peak_memory_usage_real" : 134217728
  },
  "items": {
    "0x7fc9d2a59260" : {
        "type" : "array",
        "size" : "72",
        "symbol_name" : "_FILES",
        "is_root" : true,
        "frame" : "<GLOBAL>"
,
        "children" : {

        }

    },
    "0x7fc9d2a59280" : {
        "type" : "array",
        "size" : "72",
        "symbol_name" : "argv",
        "is_root" : true,
        "frame" : "<GLOBAL>"
,
        "children" : {
            "0":"0x7fc9d2a5e008"
        }

    },
    "0x7fc9d2a5e008" : {
        "type" : "string",
        "size" : "81",
        "is_root" : false


    },
    "0x7fc9d2a592a0" : {
        "type" : "int",
        "size" : "16",
        "symbol_name" : "argc",
        "is_root" : true,
        "frame" : "<GLOBAL>"


    }
}
}

After:

{
  "header" : {
    "memory_usage" : 132475640,
    "memory_usage_real" : 134217728,
    "peak_memory_usage" : 132475896,
    "peak_memory_usage_real" : 134217728
  },
  "items": {
    "0x7f94ebe59260" : {
        "type" : "array",
        "size" : "72",
        "symbol_name" : "_FILES",
        "is_root" : true,
        "frame" : "<GLOBAL>",
        "children" : {}
    },
    "0x7f94ebe59280" : {
        "type" : "array",
        "size" : "72",
        "symbol_name" : "argv",
        "is_root" : true,
        "frame" : "<GLOBAL>",
        "children" : {
            "0":"0x7f94ebe5e008"
        }
    },
    "0x7f94ebe5e008" : {
        "type" : "string",
        "size" : "81",
        "is_root" : false
    },
    "0x7f94ebe592a0" : {
        "type" : "int",
        "size" : "16",
        "symbol_name" : "argc",
        "is_root" : true,
        "frame" : "<GLOBAL>"
    }
  }
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant