Hello Srikrishna (and colleagues): Do you mean that the application developers should expose CBOR-encoded introspection data? Why cannot the APIs support Swagger format (i.e. JSON), and the encoding will be done by the infrastructure?
I understand there is 'json2cbor' utility built in Linux secure build, is it intended to be used for Swagger data as well? Does it support Swagger? Another consideration: developers may need to update per-device introspection information "on the fly" (for example, resources may be added or removed, and this should be reflected). So it may not be a one-time conversion to CBOR. Re: samples, I think we should provide the client code actually retrieving the server introspection data, in a prasable format. In this context, I wasn't able to figure out how to do that, so I opened this issue in JIRA: https://jira.iotivity.org/browse/IOT-2498 May be there is a solution for this already? Or we need to enhance the APIs, and not just to provide the sample code? Best regards, Max On Thu, Oct 5, 2017 at 9:37 PM, Srikrishna Gurugubelli via iotivity-dev < [email protected]> wrote: > Yes, all introspection data should be cbor encoded. If there is a place > where json file is returned, it is a bug. > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Nash, George > *Sent:* Thursday, October 5, 2017 10:51 AM > *To:* Nash, George <[email protected]>; IoTivity Developer List < > [email protected]> > *Subject:* Re: [dev] Adding introspection to samples > > > > I did not see my typo yesterday. > > > > That should be `light_introspection.json` not `light_intropection.java` > sorry for confusion. > > > > One sample is using the json file the other is using the cbor file. As > Mats pointed out to me in a direct email the spec apparently says. > > > > "suitable encoding as defined in OCF Core Specification" > > > > > > *From:* [email protected] [ > mailto:[email protected] > <[email protected]>] *On Behalf Of *Nash, George > *Sent:* Wednesday, October 4, 2017 4:33 PM > *To:* IoTivity Developer List <[email protected]> > *Subject:* [dev] Adding introspection to samples > > > > I am looking at adding Introspection to Java see IOT-2773 ( > https://jira.iotivity.org/browse/IOT-2773 > <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjira.iotivity.org%2Fbrowse%2FIOT-2773&data=02%7C01%7Csrikguru%40microsoft.com%7C6c63f5a75e9149a46f1108d50c19a09f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636428226641237401&sdata=6LqNVppx9i%2F%2B0fXrzbiuyLAPX0sUqgO0OzC6tozYk6w%3D&reserved=0> > ) > > > > The CPP samples that add introspection are inconsistent: > > > > In the lightserver.cpp example the ‘light_introspection.dat’ is returned > for the introspect request > > In the simpleserver.cpp example the ‘light_instrospection.java’ is > returned for the introspect request. > > > > I thought that introspect requests returned CBOR formatted files so I > think the lightserver.cpp sample is the correct one. Could anyone verify > this for me? > > > > Thanks, > > > > George > > > > _______________________________________________ > iotivity-dev mailing list > [email protected] > https://lists.iotivity.org/mailman/listinfo/iotivity-dev > >
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
