Tuesday, September 20, 2016

Android Tutorial : order of the JSON keys change during JSON conversion

{
    "items":
    [
        {
            "AB":"one",
            "CD":"two",
            "EF":"three",
            "GH":"four",
            "IJ":"five"
        },
    ]
}
Change your Json format to below format
{
    "items":
    [
        [
             {"AB":"one"},
            {"CD":"two"},
            { "EF":"three"},
            {"GH":"four"},
            {"IJ":"five"}
], ] }
                OR
{
    "items":
    [
        
             {"AB":"one"},
            {"CD":"two"},
            { "EF":"three"},
            {"GH":"four"},
            {"IJ":"five"}
] }

No comments:

Post a Comment