Primitive types supported by Fiware Orion Context Broker?

筅森魡賤 提交于 2019-12-24 07:37:43

问题


I have been trying for some time to find in the official documentation of FIWARE which are the primitive types supported by Orion for the attributes of a context entity.

This is the only piece of information that I found about that in NGSI docs:

The attribute type represents the NGSI value type of the attribute value. Note that FIWARE NGSI has its own type system for attribute values, so NGSI value types are not the same as JSON types.

I tried to create context entities using types like "integer", "float", "text" and everything works apparently fine. But I dont know if Orion take care about attributes types?

I would appreciate some list like this from FIWARE Cepheus CEP doc.

Thank you very much in advance


回答1:


Attribute types (along with metadata types) are always use JSON string as primitive type. Orion interpret them in an opaque way (i.e. without paying any attention to the type string) except in the cases described in "Special Attribute Types" in the NGSIv2 specification, which are by the time being:

  • DateTime
  • geo:point
  • geo:line
  • geo:box
  • geo:polygon
  • geo:json

Please have a look to the refered documentation to know their meanings.




回答2:


the type is informative as has been said in this thread. You can use any JSON data type: number, string, boolean, array or object to represent your values.



来源:https://stackoverflow.com/questions/48670901/primitive-types-supported-by-fiware-orion-context-broker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!