Results 1 to 4 of 4

Thread: jsonTypeArray

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    milano italy
    Posts
    307

    Default jsonTypeArray

    Hi I trying to use the class cJsonObject until now I used cJSONParser that was created by some developers, it is ok but with very complex jason can be a problem to parse the objects/array.

    I found that new cJsonObject class is much easiest to use, but I have found first problem with array member

    Get JsonType of hoMember to iType
    If (itype=jsonTypeArray) Begin
    // how I can parse the array ?
    Move (MemberCount(hoMember) - 1) to imem // it return zero in this case
    end
    I cannot found any documentation to understand how to read the array

    documentation do not say nothing about jsonTypeArray that I found on the class source

    this is documentation aboyt jsontype

    Object type:
    Constant Meaning
    jsonTypeNull The JSON null value.
    jsonTypeBoolean Value of type Boolean
    jsonTypeDouble Value of type double
    jsonTypeInteger Value of type integer
    jsonTypeString Value of type string

    in the class source


    Enum_List
    Define jsonTypeNull
    Define jsonTypeBoolean
    Define jsonTypeDouble
    Define jsonTypeInteger
    Define jsonTypeObject
    Define jsonTypeArray
    Define jsonTypeString
    End_Enum_List
    maybe jsonTypeArray it is not yet implemented? or only missing same documentation/sample? if this is the case someone/dataaccess know how to use it?

    the json member array that is read is "results" it is read like jsonType Array. see part of json string

    .....
    "results":
    [{"providedLocation":
    {"location":"via roma 3, 18039, ventimiglia, im"},
    "locations":[{"street":"Via Roma 3","adminArea6":"","adminArea6Type":"Neighborhood" ,"adminArea5":"Ventimiglia","adminArea5Type":"City ","adminArea4":"","adminArea4Type":"County","admin Area3":"Liguria","adminArea3Type":"State","adminAr ea1":"IT","adminArea1Type":"Country","postalCode": "18039","geocodeQualityCode":"L1AAA","geocodeQuali ty":"ADDRESS","dragPoint":false,"sideOfStreet":"N" ,"linkId":"IT/ADDR/p0/4875937","unknownInput":"","type":"s","latLng":{"l at":43.79204,"lng":7.60607},"displayLatLng":{"lat" :43.79204,"lng":7.60607},"mapUrl":"https://www.mapquestapi.com/staticmap/v5/map?key=xxxxxxxxxxxxxxxxxxxxxxxx&type=map&size=225 ,160&locations=43.79204,7.60607|marker-sm-50318A-1&scalebar=true&zoom=15&rand=486291453"}]}]}
    regards
    Franco
    Last edited by franco; 11-Jan-2018 at 08:11 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •