Pat, Thiago, Uze,

I am not quite sure about this issue, so if I am not right please let me know.
My understanding when CBOR mandatory was agreed, I thought the design would be 
made in the way JSON also can be used.

You know, CBOR is mandatory and JSON is optional in CORE spec, but if some 
vertical needs JSON as mandatory for some reasons,
then Vertical spec can make JSON mandatory and can talk as mandatory.
My personal thought is IoTivity doesn't need to cover all this and to support 
JSON, 
but IoTivity should support easy way to add JSON if someone wants in terms of 
the fact that JSON format is popular.

Regards
June


June Yong Young
OIC Open Sourece WG Project Planning & Requirement TG Chair 
IoTivity Release Function Lead

Samsung Electronics Co.,Ltd.
Software R&D Center, IoT Solution Lab. | Web & Convergence Team
Principal Engineer

T: +82-31-301-6107, M: +82-10-9530-6107
E-mail :juney at samsung.com


-----Original Message-----
From: Thiago Macieira [mailto:[email protected]] 
Sent: Friday, July 03, 2015 5:33 AM
To: ???(June Yong Young)
Cc: 'Keane, Erich'; uzchoi at samsung.com; 'Lankswert, Patrick'; iotivity-dev 
at lists.iotivity.org; dwarka.dayama at samsung.com
Subject: Re: [oswg] [Pat, Uze] Groups - Action Item "CBOR Comms to SWG" Closed

On Thursday 02 July 2015 15:19:03 ??? wrote:
> Thiago,
> 
> 
> 
> I?d just like to confirm one thing.
> 
> My understanding from your explanation is if there is someone to wants 
> to use JSON,
> 
> then it is very easy to add JSON parser and use it based on current 
> IoTivity API implementation. Is this correct?

Hello June

In theory, yes. In practice, this will depend on how we structure the code. 
That was the original idea, when I wrote the proposal. Then when I started 
doing the work, it looked actually quite difficult to achieve, so the D&C 
codebase would insert CBOR unconditionally. To send JSON only, you'd need to go 
out of Iotivity and write your own stack.

Since Erich took over the implementation, he's actually created an abstraction 
layer that could be used to encode in something different than CBOR. Whether 
that will actually work remains to be proven. Even then, there are no plans to 
hook up a JSON encoder or decoder, so in order to do JSON you'll have to modify 
IoTivity libraries or use another implementation.

> And Dwarka will check if the line in red in Core Spec will be changed 
> in SWG.
[cut]
> f) The OIC Devices that receive this request shall respond in JSON 
> which is in conformance to 25 the JSON schema. In later versions of 
> the specification other formats could be included (e.g., 26 XML/EXI)

Right, this will need to change.

The CoAP request should include the formats that the client doing discovery 
accepts and that header must include format "application/cbor" (format ID 60). 
It can optionally contain others. The service being discovered can reply using 
any of the formats listed in the client's CoAP header.

In practice, tiny servers will always reply in CBOR.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Reply via email to