JSON Component Architecture#
JSON Architecture
|
status: draft
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 nlohman_json OSS library (see nlohman/json). This decision still has to be documented (TBD).
JSON writing functionality is implemented in the “Wrapper”, i.e. the nlohman_json OSS library is not used for this. Reasoning is that this functionality is reused from an already qualified baselibs implementation.
Design Constraints:
The feature description states that this component provides a “JSON abstraction layer that can switch between different parsers/serializers under the hood.”
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), enable switch of implementation but providing a stable API.
Static Architecture#
JSON
|
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#
IJson
|
status: valid
security: YES
safety: ASIL_B
|
||||
|
|||||
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
|
||||
nlohman-JSON
|
status: valid
security: YES
safety: ASIL_B
|
||||