File indexing completed on 2025-08-03 07:49:15
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/Json/GeometryIdentifierJsonConverter.hpp"
0010
0011 void Acts::to_json(nlohmann::json& j, const GeometryIdentifier& geoId) {
0012 j = GeometryIdentifierJsonConverter::encodeIdentifier(geoId);
0013 }
0014
0015 void Acts::from_json(const nlohmann::json& j, GeometryIdentifier& geoId) {
0016
0017 if (!j.is_object()) {
0018 auto value = j.get<GeometryIdentifier::Value>();
0019 geoId = GeometryIdentifier(value);
0020 return;
0021 }
0022
0023 geoId = GeometryIdentifierJsonConverter::decodeIdentifier(j);
0024 }