0

{ "Pump Details": { "Pump Configuration": "DUO", "Keypad": [{ "Keypad AssetID ": 0, "Keypad SHASignature": null, "KeyPad Software Version": null, "Keypad CheckSum": null, "Keypad Unique ID": null, "Keypad FuelingPontID": "1", "Keypad ID": "1" }, { "Keypad AssetID ": 0, "Keypad SHASignature": null, "KeyPad Software Version": null, "Keypad CheckSum": null, "Keypad Unique ID": null, "Keypad FuelingPontID": "2", "Keypad ID": "2" }], "Cpu": [{ "CpuAssetID ": 0, "CpuSHASignature": null, "CpuCheckSum": null, "CpuUnique ID": null, "CpuSoftware Version": null }], "Pump Serial Number": "194719471951", "Pulser": [{ "Pulser Unique ID": null, "Pulser SHASignature": null, "Pulser Software Version": null, "Pulser AssetID ": 0, "Pulser ID": "1", "Pulser FuelingPontID": "1", "Pulser CheckSum": null }, { "Pulser Unique ID": null, "Pulser SHASignature": null, "Pulser Software Version": null, "Pulser AssetID ": 0, "Pulser ID": "2", "Pulser FuelingPontID": "2", "Pulser CheckSum": null }], "Display": [{ "Display FuelingPontID": "1", "Display SHASignature": null, "Display CheckSum": null, "Display ID": "1", "Display Unique ID": null, "Display AssetID ": 0, "Display Software Version": null }, { "Display FuelingPontID": "2", "Display SHASignature": null, "Display CheckSum": null, "Display ID": "2", "Display Unique ID": null, "Display AssetID ": 0, "Display Software Version": null }] } }

1 Answers1

0

You can make it with Gson liike that.(You make all object types.You should check parameter types.)

class Keypad{
@SerializedName("Keypad AssetID") public int AssetID;
@SerializedName("Keypad SHASignature") public String SHASignature;
@SerializedName("KeyPad Software Version") public String SoftwareVersion;
@SerializedName("Keypad CheckSum") public String CheckSum;
@SerializedName("Keypad Unique ID") public String UniqueID;
@SerializedName("Keypad FuelingPontID") public String FuelingPontID;
@SerializedName("Keypad ID") public String ID;
}
yahya.can
  • 1,790
  • 1
  • 11
  • 9