|
12 | 12 | # SPDX-License-Identifier: Apache-2.0 |
13 | 13 | # ******************************************************************************* |
14 | 14 |
|
15 | | -.. _comp_doc_json: |
| 15 | +JSON-Library |
| 16 | +=========================== |
| 17 | + |
| 18 | +.. document:: JSON-Library |
| 19 | + :id: doc__json |
| 20 | + :status: valid |
| 21 | + :safety: ASIL_B |
| 22 | + :tags: component_request |
16 | 23 |
|
17 | | -json |
18 | | -#### |
19 | 24 |
|
20 | 25 | .. toctree:: |
21 | 26 | :hidden: |
22 | 27 |
|
23 | | - architecture/index |
| 28 | + requirements/index.rst |
| 29 | + architecture/index.rst |
| 30 | + |
| 31 | + |
| 32 | +Abstract |
| 33 | +======== |
| 34 | + |
| 35 | +This component request proposes the integration of a safe JSON-Library with parsing functionality. |
| 36 | + |
| 37 | + |
| 38 | +Basic Functionality |
| 39 | +---------------------- |
| 40 | +The component shall support parsing JSON data and convert that information to a compatible user format. |
| 41 | + |
| 42 | + |
| 43 | +Future Extensions |
| 44 | +---------------------- |
| 45 | +The component shall support a future extension for serializing from user format into JSON data. |
| 46 | + |
| 47 | + |
| 48 | +Motivation |
| 49 | +========== |
| 50 | + |
| 51 | +S-CORE is targeting high-performance automotive systems with safety impact. |
| 52 | +Some applications, like the IPC communication solution, require a safe JSON-Library with parsing functionality to enable loading of configuration information at runtime. |
| 53 | +There is currently no solution for this inside S-CORE. |
| 54 | + |
| 55 | +Rationale |
| 56 | +========= |
| 57 | + |
| 58 | +A JSON-Library with parsing functionality needs to be introduced in S-CORE software platform due to specific functional dependencies of different features (ex: IPC). |
| 59 | + |
| 60 | +Further details are available in the following section: |
| 61 | +.. _Specification: |
| 62 | + |
| 63 | +Specification |
| 64 | +============= |
| 65 | + |
| 66 | +The following details and requirements describe the aspects of current feature in the context of S-CORE. |
| 67 | + |
| 68 | +General considerations |
| 69 | +---------------------- |
| 70 | + |
| 71 | +The JSON-Library should provide parsing and data conversion capabilities: |
| 72 | + |
| 73 | +:need:`comp_req__json__validation` |
| 74 | +:need:`comp_req__json__deserialization` |
| 75 | +:need:`comp_req__json__user_format` |
| 76 | + |
| 77 | +The component should be extensible in the future in order to support conversion of user format to JSON data. |
| 78 | + |
| 79 | +User friendly API |
| 80 | +----------------- |
| 81 | + |
| 82 | +Programming languages have their own feature set and idioms. |
| 83 | +It is crucial for any library that it seamlessly integrates into both. |
| 84 | +This means, wherever possible and meaningful, infrastructure of the programming language and accompanying standard |
| 85 | +libraries shall be reused. |
| 86 | +Further, a developer used to the programming language shall have no problems understanding the API. |
| 87 | +It should feel natural to use. |
| 88 | +This includes error handling, which shall follow one of the error handling concepts of the programming language. |
| 89 | + |
| 90 | +1. :need:`comp_req__json__lang_idioms` |
| 91 | +2. :need:`comp_req__json__lang_infra` |
| 92 | + |
| 93 | +Full testability for the public API |
| 94 | +---------------------------------------- |
| 95 | + |
| 96 | +Our users will be required to proof certain coverage metrics, like line coverage or branch coverage. |
| 97 | +For them to reach full coverage, they need to be easily able to mock or fake the public API of the JSON-Library in their unit tests. |
| 98 | + |
| 99 | +:need:`comp_req__json__full_testability` |
| 100 | + |
| 101 | +Backwards Compatibility |
| 102 | +======================= |
| 103 | + |
| 104 | +As there is currently no previous solution in S-CORE, no backwards compatibility is required. |
| 105 | + |
| 106 | +Security Impact |
| 107 | +=============== |
| 108 | + |
| 109 | +For access control and manipulation prevention (e.g. dm-verity) the hosting process and system configuration are responsible. |
| 110 | + |
| 111 | +Safety Impact |
| 112 | +============= |
| 113 | + |
| 114 | +Overall, the component shall support use cases up to ASIL-B. |
| 115 | + |
| 116 | +License Impact |
| 117 | +============== |
| 118 | + |
| 119 | +[How could the copyright impacted by the license of the new contribution?] |
| 120 | + |
| 121 | +How to Teach This |
| 122 | +================= |
| 123 | + |
| 124 | +[How to teach users, new and experienced, how to apply the CR to their work.] |
0 commit comments