I have a JSON Content in a String and sometimes it has numeric tags which has to be removed. 

Below is a sample JSON content

```
{
"Test": {
   "P1": false,
    P2": {
        "2000": [
        {
        "DP": "DP TEST",
        "id": "ID TEST"
        }
                ],
        "4000": [
        {
        "DP": "DP TEST",
        "id": "ID TEST"
        }
        ],
        "5000": [
        {
        "DP": "DP TEST",
        "id": "ID TEST"
        }
        ],
        "8000": [
        {
        "DP": "DP TEST",
        "id": "ID TEST"
        }
        ],
        "6000": [
        {
        "DP": "DP TEST",
        "id": "ID TEST"
        }
        ]
    },
    "P3": "XYZ",
    "P4": ABC,
    "VL": "",
    "PL": [{
            "start_date": 1496480880.0,
            "id": "TEST1"
        }
    ],
},
"PS": "AMD",
"links": [{
        "LOC": "en-US",
        "PS": "AMD"
    }, {
        "LOC": "fr-CA",
        "PS": "AMD"
    }
]   
}

```

In the above case "P2" tag has numeric keys and in such case we need to display it as after converting the string to JSON. Which means, we need to remove the tags which has numeric keys.

I have tried with org.json, org.json.simple and com.gson as well but nothing seems to work.

I am able to read each line using the below code snipet

```
public static void printJson(JsonElement jsonElement) {

    // Check whether jsonElement is JsonObject or not
    if (jsonElement.isJsonObject()) {
        Set<Entry<String, JsonElement>> ens = ((JsonObject) jsonElement).entrySet();
        if (ens != null) {
            // Iterate JSON Elements with Key values
            for (Entry<String, JsonElement> en : ens) {
                try{
                    Integer.parseInt(en.getKey());
                    break;
                }catch(NumberFormatException ex){
                    if("".equals(str)){
                        str = "\"" + en.getKey() + "\": {";
                    }else{
                        str = str + "\"" + en.getKey() + "\": {";
                    }
                    System.out.println(en.getKey() + "-----" + en.getValue());
                }
                printJson(en.getValue());
            }
        }
    } 

    // Check whether jsonElement is Arrary or not
    else if (jsonElement.isJsonArray()) {
                JsonArray jarr = jsonElement.getAsJsonArray();
                // Iterate JSON Array to JSON Elements
                for (JsonElement je : jarr) {
                    printJson(je);
                }
    }

    // Check whether jsonElement is NULL or not
    else if (jsonElement.isJsonNull()) {
        // print null
        System.out.println("null");
    } 
    // Check whether jsonElement is Primitive or not
    else if (jsonElement.isJsonPrimitive()) {
        // print value as String
        if("".equals(str)){
            str = "\"" + jsonElement.getAsString() + "\"";
        }else{
            str = str + "\"" + jsonElement.getAsString() + "\"";
        }
        System.out.println(jsonElement.getAsString());
    } 
    }

```

But am unable to remove the numeric keyed tags. Can someone please help me with this.