JSON Component Architecture#
JSON Architecture
|
status: draft
security: YES
safety: ASIL_B
|
||||
Overview#
The component JSON implements functionality for reading/parsing JSON data and also to write. It provides currently only a C++ API.
Requirements Linked to Component Architecture#
See the “fulfils” links in static and dynamic architecture below.
Description#
JSON provides an abstraction layer to underlying implementations, in first iteration there is only one implementation provided. But generally there is a “Wrapper” and an “Implementation” lower-level component.
Design Decisions:
It was decided to use the vaJson parser from Vector (see vajson (doc__vajson)), which is ASIL D certified.
JSON writing functionality is provided by the vaJson serializer, which is wrapped by the “Wrapper” component.
Design Constraints:
The feature description states that this component provides a “JSON abstraction layer that can switch between different parsers/serializers under the hood.” Currently vaJson is the only implementation, for parsing as well as for serialization, so nothing is selectable.
Rationale Behind Architecture Decomposition#
The decomposition in a wrapper and an implemetation component already comes from the feature definition, the main driver is to re-use existing implementation(s) and to allow replacing the implementation while providing a stable API.
Static Architecture#
JSON
|
status: valid
security: YES
safety: ASIL_B
|
||||
JSON Static view
|
status: valid
security: YES
safety: ASIL_B
|
||||
|
|||||
Dynamic Architecture#
JSON dynamic arch
|
status: invalid
security: YES
safety: ASIL_B
|
||||
put here a sequence diagram (TBD) |
|||||
Interfaces#
Parse
|
status: valid
security: YES
safety: ASIL_B
|
||||
Write
|
status: valid
security: YES
safety: ASIL_B
|
||||
Lower Level Components#
JSON-Wrapper
|
status: valid
security: YES
safety: ASIL_B
|
||||
See VaJson (comp__baselibs_vajson) in VaJson Architecture (doc__vajson_architecture) for the vaJson lower-level component.