[oslc-core] Core 2.0 JSON Representation Guidelines - ambiguity in serialization of literals

Andrew J Berner ajberner at us.ibm.com
Wed Sep 21 09:34:06 EDT 2011


Michael F Fiedler/Durham/IBM at IBMUS said:

> 4. RTC serializes rtc_cm:correctedEstimate with a JSON representation of
> null when there is no
>     value (XML representation is
> <rtc_cm:correctedEstimate></rtc_cm:correctedEstimate>.
>
>           - Recommendation:  Not an OSLC field, so outside the scope of
the
> spec.  However, if this was an OSLC-defined
>             field, the value should not be returned in the XML or JSON
> representations.   Clarify the spec to state this.

RTC allows partial update using PUT....you send the data you want changed,
and fields you don't include in the content of the PUT are left alone.

Partial update of course has been an issue and we backed off from
addressing it in Core 2.0.  When it is included in the spec, RTC may need
to change.

But if we bake into the spec that blank values should not be included in
the XML representation, then the current mechanism falls apart since you
can't tell the difference between "I left it out so leave it alone" and
"I"m setting it to null".

So we have to make sure that if this is included, then we have the
mechanism for partial update also in the spec (perhaps with PATCH).  Just
be aware what that implies about compatibility of api versions.





More information about the Oslc-Core mailing list