json with key "ids" is problematic?
See original GitHub issueNow to be honest i’m a little bit confused, but when i do a call with
scope.myobj.post("merge", {"ids":"test"});
there is only an empty {} json object in the request body.
However if i change ids to something else, e.g.
scope.myobj.post("merge", {"ids2":"test"});
it works. I cleared browser cache and the myobj object is perfectly fine(every other request works, e.g. delete, put, get etc.).
I don’t think it is a restangular issue, but what could it be?
Issue Analytics
- State:
- Created 10 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
JSON: key items by id or not? - Stack Overflow
From my work experience, the former creates a real problem for clients (apps in my case) to parse the JSON data, as it...
Read more >Relationships data object - id is not primary key - JSON API
So I just faced a problem when I do not use id as a primary key. I would need something like this (see...
Read more >Problem with reserved resource attribute names #361 - GitHub
There are 4 reserved resource attribute names in JSON API: id , type , links ... It is very common to use column...
Read more >Is it bad practice to use hyphens in JSON keys?
It is not really a bad practice, since JSON is language independent and therefore shouldn't be constrained by the syntax of any particular...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
The JavaScript exceptions thrown by JSON.parse() occur when string failed to be parsed as JSON.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ngehlert as in the spec snippet above:
Now restangular will use a property called
_ids
on each restangularized object instead of the defaultids
, which is clashing with your object’s property. The documentation is a bit behind on this matter, I’ll try to update it with some better info.The above is a global configuration when done like this. But you can scope the configuration also:
@bostrom awesome thanks 😄 well yeah it is actually quite easy then 👍