node_save JSON field formats I'm having an issue where node_save() (inserting new node) ignores some fields in my JSON node.  This happens with several content/widget types.
I've posted this to Drupal services with no response.

I followed Tyler's post here recommending to do a GET to observe and mimic the JSON format returned - unfortunately I'm finding the format returned in a GET is not always the same format as expected in a node_save() POST. 
https://github.com/signalpoint/DrupalGap/issues/418

I also saved a node on our Drupal website and captured the format of the POST
body, trying to translate that format to analogous JSON.  No luck.


Date time field, with start and end date, using Date (Unix timestamp) field
type and pop-up calendar widget.
Formats recommended in the post below does not save, only default value (now) 
is saved.  Example is field_when_available below.
Services module update date field
Integer field types with Text field widget will not save.
I've tried over 20 permutations of formats, posted here, no response.
htt ps://www.dru pal.org/node/2870095
field_scrap_weight is an example below.
Reference to another node will not save.
Same link above describes using target_id, tried that, no success.


What will save are are term reference and List(text) content types from 
Radio button widgets.   field_surplus_type and field_unprepared_or_prepared
are examples.

I am posting to
http://127.0.0.1:8083/?q=drupalgap/node.json

Below is one example, but I've tried literally hundreds of permutations
with and without array brackets, with/without the "und" element, 
with/without quotes in the data value, etc.

I'm beginning to think there's a more global/systematic issue like a content-type setting.

{
  "type": "donation",
  "form_id": "donation_node_form",
  "language":"und",
  "field_unprepared_or_prepared": {    // saves OK (List text, checkbox/radio)
    "und": {
      "value": "unprepared"
    }
  },
  "field_surplus_type": {        // saves OK (Term ref, checkbox/radio)
    "und": [ 1, 3  ]
  },
  "field_scrap_weight": {        // NOT saved (integer, text field)
    "und": {"value": "1"}
  },
  "field_when_available": {      // NOT saved (Unix timestamp), popup calendar
    "und":[
      {
        "value": {
            "date": "05/29/2017",
            "time":"09:00pm"
        },
        "value2": {
            "date": "05/29/2017",
            "time":"09:00pm"
        },
        "timezone": "America\/New_York",
        "timezone_db": "UTC",
        "date_type": "datestamp"
      }]
  },
  "field_surplus_location": {     // NOT saved - node reference
    "und": {"target_id":"256"}
  },
  "body": {           // NOT saved (long text w/summary, text area widget)
    "und": {
      "value": "dd"
    }
  }
}
It's important to understand that the Services module is closely tied to the Drupal Forms API, meaning that the JSON delivered via POST/PUT is sometimes dependent on the Widget that is selected for the field(s) in question, so it won't always match what is delivered via GET.

That being said, I can see some problems with your JSON. Try these instead:

integer, text field

"field_scrap_weight": {
  "und": [ { "value": "1" } ] 
},


node reference

"field_surplus_location": {
  "und": [ { "target_id":"... (256)" } ]
},


long text w/summary, text area widget

"body": {
  "und": [ {
    "value": "dd"
  } ]
}


Often times it appears you are missing the wrapping [], this indicates the delta value for the field's item, i.e. it's an array so you can pile up extra values if your field is configured for more than 1 value.

The entity reference field can be any text, but the target id must be wrapped in the parenthesis.

The Date field is the trickiest and I would advise looking at the following answers:


https://drupal.stackexchange.com/a/78925/10645
https://drupal.stackexchange.com/a/180101/10645
https://www.drupal.org/node/1898072


If you're looking to POST/PUT exactly what is delivered via GET, then check out the Services Entity module and this extra configuration that can be added to jDrupal.