Git Product home page Git Product logo

Comments (5)

jpmens avatar jpmens commented on June 11, 2024 1

Can't test just now, but please note _type: waypoints expects an array of waypoints, so I think your JSON should look like

{
  "_type": "cmd",
  "action": "setWaypoints",
  "waypoints": {
    "_type": "waypoints",
    "waypoints": [
      {
        "desc": "Test",
        "rad": 500,
        "lon": 12.345,
        "lat": 56.789,
        "tst": 1698635212,
        "_type": "waypoint"
      }
    ]
  }
}

from android.

jpmens avatar jpmens commented on June 11, 2024 1

As to your comment regarding the key, I note we've not documented this for Android. Your quote is specifically labelled as on iOS. I only very vaguely recall we did change this at some point in order to be able to rename a waypoint.

@ckrey and @growse: I please need your input here do possibly amend the docs: what is the key for a waypoint in the setWaypoints command?

from android.

jpmens avatar jpmens commented on June 11, 2024 1

On Android there's a primary key which isn't surfaced to the API, and tst is a uniquely-constrained value which effectively acts like a key.

from android.

wir3z avatar wir3z commented on June 11, 2024 1

Found root cause of this one. Classic "issue between keyboard and chair". When you send an array of waypoints to the app, the app echo's back each one that it processed.

The "exception" was me not returning an empty JSON array of [] so that was showing up as invalid in the JSON parser.

from android.

wir3z avatar wir3z commented on June 11, 2024

I've tried it framed as any array, and same deal. Just to double check, I copied the waypoint block from a publish waypoints as well as the a configuration export, and same error. Processes the JSON fine, loads/modifies the waypoints as expected, just logs the parse exception.

On Android, TST seems to be the key, which is working great. I was wanting to be able to automates a single edit location, and then push those to the other "friends" which is working -- just the parser error.

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.