Options

Json reader - google maps api

foo_barfoo_bar Member Posts: 91
Hello,

I am looking for a solution on how ro read the json response i get from the google maps api.

I want to send address information to the api, and based on the response i get in the status field, then I know if the address is valid or not.

this is a response I recieve from a non valid address:
{
   "geocoded_waypoints" : [
      {
         "geocoder_status" : "OK",
         "place_id" : "Ei5HdWlkbyBHZXplbGxlc3RyYWF0IDU3LCA4NTUwIFp3ZXZlZ2VtLCBCZWxnacOr",
         "types" : [ "street_address" ]
      },
      {
         "geocoder_status" : "ZERO_RESULTS"
      }
   ],
   "routes" : [],
   "status" : "NOT_FOUND"
}

this is the URL I have to process:
https://maps.googleapis.com/maps/api/directions/json?origin=_address_

I have tried using the json parser from here: http://www.dynamics.is/?p=2303
but I can not get it to work..

Could any1 help me in the right direction?

thank you

Best Answer

Answers

  • Options
    JuhlJuhl Member Posts: 724
    Json.net
    Follow me on my blog juhl.blog
  • Options
    foo_barfoo_bar Member Posts: 91
    Hello,

    I have created a DLL , I've placed the dll in the add-in folder and i've registered the dll in controll add-in in navision, and restarted the navision service.

    but when I run my codeunit, I am still getting the 'can not load an instance of the following .NET framework ...' error.
    Am I missing a step somewhere?
  • Options
    Remco_ReinkingRemco_Reinking Member Posts: 74
    Or you get the result in a XML structure.
    Sample:
    //maps.googleapis.com/maps/api/geocode/xml?
  • Options
    foo_barfoo_bar Member Posts: 91
    I got the dll working, I was putting it in the wrong add in folder..
    now I can read my status result, wich is in the rootobject level, but when I try to read something from a 2nd level (rootobject/geocoder_status for example), all I get is blanks.. so this is my next challenge :)
  • Options
    geordiegeordie Member Posts: 655
    edited 2016-09-14
    Look at this comment and respective replies, it may help you.
Sign In or Register to comment.