• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 35789133600
90%

Build:
DEFAULT BRANCH: main
Ran 22 Sep 2026 09:58PM UTC
Jobs 3
Files 288
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Sep 2026 09:51PM UTC coverage: 87.18% (-0.003%) from 87.183%
35789133600

push

github

web-flow
Compose the C++ JSON de-serialization (#747)

A class found each of its properties by name, and spelled out a
procedure around every one of them.

We change the de-serialization process and introduce simpler building
boxes to make it easier to understand.

**A class walks its keys once.** A name-to-literal map and a ``switch``
replace asking, per declared property, whether it is there and then
fetching it -- two tree walks each, nlohmann's object being a
``std::map``. An unknown key falls out of the lookup.

    // before, per property, in each of the ``Deserialize{Cls}``
    if (!additional_properties) {
      for (const auto& key_val : json.items()) {
        auto it(kPropertiesInExtension.find(key_val.key()));
        if (it == kPropertiesInExtension.end()) { ...18 lines... }
      }
    }
    ...
    if (json.contains("semanticId")) {
      std::tie(
        the_semantic_id,
        error
      ) = DeserializeReference(
        json["semanticId"],
        additional_properties
      );

      if (error.has_value()) {
        error->path.segments.emplace_front(
          common::make_unique<PropertySegment>(
            L"semanticId"
          )
        );

        return std::make_pair<
          common::optional<std::shared_ptr<T> >,
          common::optional<DeserializationError>
        >(
          common::nullopt,
          std::move(error)
        );
      }
    }

    // after
    common::optional<DeserializationError> error(
      ParseProperties(
        json,
        properties::kMapOfExtension,
        additional_properties,
        [&](
          properties::OfExtension property,
          const nlohmann::json& value
        ) -> common::optional<DeserializationError> {
          switch (property) {
            case properties::OfExtension::kSemanticId:
              return ParseInto(
                the_semantic_id,
                DeserializeReference(
                  value,
                  additional_properties
                ... (continued)

193 of 203 new or added lines in 1 file covered. (95.07%)

36968 of 42404 relevant lines covered (87.18%)

2.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
94.63
-0.62% aas_core_codegen/cpp/lib/_generate_jsonization.py
Jobs
ID Job ID Ran Files Coverage
1 3.11 - 35789133600.1 22 Sep 2026 09:59PM UTC 288
87.18
GitHub Action Run
2 3.10 - 35789133600.2 22 Sep 2026 09:59PM UTC 288
87.18
GitHub Action Run
3 3.12 - 35789133600.3 22 Sep 2026 09:59PM UTC 288
87.18
GitHub Action Run
Source Files on build 35789133600
  • Tree
  • List 288
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e8fc5325 on github
  • Prev Build on main (#35778356506)
  • Next Build on main (#35799683348)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc