lundi 17 avril 2017

How to create `random` value added object for json array?

According to the client clicks on 50 or 100 and 500 I require to create the random json objects. I don't how to to create the random object to fit for my json requirement.

I know that we are creating numbers or string generally, but how to create a hole json object itself?

here is what i require to randomize the object of user option:

{
    "deviceType": "Kiosi 891,891W Integrated Services Router G2",
    "label": "WAN-EDGE - MOCK1",
    "ip": "192.168.10.2",
    "softwareVersion": "15.1(4)M2",
    "nodeType": "device",
    "family": "Routers",
    "platformId": "CISCO891W-AGN-A-K9",
    "tags": [

    ],
    "role": "BORDER ROUTER",
    "roleSource": "AUTO",
    "customParam": {

    },
    "additionalInfo": {
      "macAddress": "44:d3:ca:1e:72:34"
    },
    "id": "373ce7a8-8843-43ac-879a-283f21abfed1"
}

any one help me to randomize the object with all fields which fit with text or number length of each.

Thanks in Advance.




Aucun commentaire:

Enregistrer un commentaire