Jump to content









Photo

Is Carriots Reodering data?

Streams Create

  • Please log in to reply
3 replies to this topic

#1 Zambiot

Zambiot

    Advanced Member

  • Members
  • PipPipPip
  • 94 posts
  • LocationAsia

Posted 10 March 2013 - 06:09 AM

When my device does a stream create, I have data order such as the following:

 

Item 1

Item 2

...

Item10

 

The device builds the message body in the above order.  When the data is viewed on Carriots, it is in a different order.  Is Carriots some how reordering elements of the json post?  It would be nice if it didn't so that I could look at my code and the online view of the stream and compare data.



#2 alvaro

alvaro

    Carriots CTO

  • Administrators
  • 72 posts

Posted 10 March 2013 - 11:26 AM

Hello Zambiot.

 

Yes, Carriots is persisting JSON structures with no strict order defined. We follow the JSON RFC (IETF RFC 4627) as shown on http://json.org/ and for performance reasons we keep it unordered.

 

I've found this JSON diff tool that may be useful http://tlrobinson.ne...pt-fun/jsondiff

 

HIH


Alvaro Everlet

Carriots CTO


#3 Zambiot

Zambiot

    Advanced Member

  • Members
  • PipPipPip
  • 94 posts
  • LocationAsia

Posted 12 March 2013 - 12:27 AM

Yes, this is a helpful tool for me.  Thank you.  

 

Perhaps, in time, a section of the Carriots Documentation can included links to useful tools like these.  



#4 alvaro

alvaro

    Carriots CTO

  • Administrators
  • 72 posts

Posted 12 March 2013 - 07:57 AM

Yes, good appointment. I think some links to useful tools, Groovy tricks and some other useful info could be a nice section.


Alvaro Everlet

Carriots CTO






Also tagged with one or more of these keywords: Streams, Create

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users