AutoTools Cant Parse Json Data

Discussion in 'AutoApps' started by Fighting Pickles, Dec 23, 2016.

  1. Fighting Pickles

    Fighting Pickles New Member

    Joined:
    Sep 13, 2016
    Messages:
    6
    Likes Received:
    0
    I'm having an issue with the JSON Read action. At a high level, the following is my use case:
    1. Get current location
    2. Use the latitude and longitude to pull the weather forecast from WeatherUnderground.
    AutoLocation does a fine job of retrieving my current location. I then write some of the location data to a JSON using AutoTools, JSON Write. The resulting JSON looks like this:
    {
    "altitude": "Not Reported",
    "bearing": "N/A",
    "latitude": "39.7685116",
    "speed": "N/A",
    "time": "1:30 PM",
    "longitude": "-105.0208127"
    }​
    In another task, I attempt to read the latitude and longitude out of the above JSON using AutoTools. However, I get the following error:
    14.21.24/ActionArgBundle key: SortArrayKey: replace <null> String value with null
    14.21.24/ActionArgBundle key: JsonRootVariable: replace <null> String value with null


    14.21.24/ActionArgBundle key: SortArrayObjectKey: replace <null> String value with null


    14.21.24/ActionArgBundle key: MatchField: replace <null> String value with null


    14.21.24/ActionArgBundle key: MatchValue: replace <null> String value with null


    14.21.24/ActionArgBundle key: VariableName: replace <null> String value with null


    14.21.24/ActionArgBundle key: MaxResults: replace <null> String value with null


    14.21.24/ActionArgBundle key: Max: replace <null> String value with null


    14.21.24/ActionArgBundle key: Min: replace <null> String value with null


    14.21.24/ActionArgBundle key: Sum: replace <null> String value with null


    14.21.24/ActionArgBundle key: Query: replace <null> String value with null


    14.21.24/ActionArgBundle key: InputFormat: replace <null> String value with null


    14.21.24/ActionArgBundle key: JoinOutputArray: replace <null> String value with null


    14.21.24/ActionArgBundle key: Average: replace <null> String value with null


    14.21.24/E FIRE PLUGIN: AutoTools Json Read / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 29 bundle keys


    14.21.24/E AutoTools Json Read: plugin comp: com.joaomgcd.autotools/com.joaomgcd.autotools.broadcastreceiver.BroadcastReceiverFire


    14.21.24/E add wait type Plugin2 time 60

    14.21.24/E add wait type Plugin2 done
    The %err and %errmsg variables contain -

    1732149406
    Input is not valid JSON data: A JSONArray text must start with '[' at 1 [character 2 line 1]​
    I'm stuck. The JSON validates as having the correct structure. Where do I go from here?
     
    Last edited: Dec 23, 2016
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance
     

Share This Page