Skip to main content
Jump to: navigation, search

BaSyx / Documentation / VAB / JSON Serialization

< BaSyx ‎ | Documentation ‎ | VAB
Revision as of 06:54, 7 August 2020 by Frank.schnicke.iese.fraunhofer.de (Talk | contribs) (Removes references to Set support)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
See also HTTP/REST Mapping TCP Mapping Exceptions

JSON Serialization

Both the TCP and the HTTP mapping use a json serialization for objects send over the VAB. In the following, this json serialization is explained.

Requirements

There are multiple requirements on the JSON serialization:


Type Representation

The following types are taken as is from the JSON type scheme:

  • string
  • number (integer or double)
  • object (i.e. map)
  • boolean
  • null

Additionally, these types are introduced:

  • ordered lists
  • functions

Functions

Functions are most commonly not serializable. Exception of this are Java functions, that can be represented by their byte code. However, there still needs to be an indication that a value is representing a function. This is done by passing this information in the _basyxFunctionType key. The allowed values are:

  • lambda
  • operation

Back to the top