Merge commit 'fc547d902c2e110b671a095b9731aff18154e68d' into amzn-tommy/gitflow_211116_o3de2
This commit is contained in:
@@ -104,6 +104,8 @@ namespace AZ
|
|||||||
->HandlesType<AZStd::variant>();
|
->HandlesType<AZStd::variant>();
|
||||||
jsonContext->Serializer<JsonOptionalSerializer>()
|
jsonContext->Serializer<JsonOptionalSerializer>()
|
||||||
->HandlesType<AZStd::optional>();
|
->HandlesType<AZStd::optional>();
|
||||||
|
jsonContext->Serializer<JsonBitsetSerializer>()
|
||||||
|
->HandlesType<AZStd::bitset>();
|
||||||
|
|
||||||
MathReflect(jsonContext);
|
MathReflect(jsonContext);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace AZ
|
|||||||
AZ_CLASS_ALLOCATOR_IMPL(JsonAnySerializer, SystemAllocator, 0);
|
AZ_CLASS_ALLOCATOR_IMPL(JsonAnySerializer, SystemAllocator, 0);
|
||||||
AZ_CLASS_ALLOCATOR_IMPL(JsonVariantSerializer, SystemAllocator, 0);
|
AZ_CLASS_ALLOCATOR_IMPL(JsonVariantSerializer, SystemAllocator, 0);
|
||||||
AZ_CLASS_ALLOCATOR_IMPL(JsonOptionalSerializer, SystemAllocator, 0);
|
AZ_CLASS_ALLOCATOR_IMPL(JsonOptionalSerializer, SystemAllocator, 0);
|
||||||
|
AZ_CLASS_ALLOCATOR_IMPL(JsonBitsetSerializer, SystemAllocator, 0);
|
||||||
|
|
||||||
JsonSerializationResult::Result JsonUnsupportedTypesSerializer::Load(void*, const Uuid&, const rapidjson::Value&,
|
JsonSerializationResult::Result JsonUnsupportedTypesSerializer::Load(void*, const Uuid&, const rapidjson::Value&,
|
||||||
JsonDeserializerContext& context)
|
JsonDeserializerContext& context)
|
||||||
@@ -49,4 +50,10 @@ namespace AZ
|
|||||||
return "The Json Serialization doesn't support AZStd::optional by design. No JSON format has yet been found that wasn't deemed too "
|
return "The Json Serialization doesn't support AZStd::optional by design. No JSON format has yet been found that wasn't deemed too "
|
||||||
"complex or overly verbose.";
|
"complex or overly verbose.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AZStd::string_view JsonBitsetSerializer::GetMessage() const
|
||||||
|
{
|
||||||
|
return "The Json Serialization doesn't support AZStd::bitset by design. No JSON format has yet been found that is content creator "
|
||||||
|
"friendly i.e., easy to comprehend the intent.";
|
||||||
|
}
|
||||||
} // namespace AZ
|
} // namespace AZ
|
||||||
|
|||||||
@@ -65,4 +65,14 @@ namespace AZ
|
|||||||
protected:
|
protected:
|
||||||
AZStd::string_view GetMessage() const override;
|
AZStd::string_view GetMessage() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class JsonBitsetSerializer : public JsonUnsupportedTypesSerializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AZ_RTTI(JsonBitsetSerializer, "{10CE969D-D69E-4B3F-8593-069736F8F705}", JsonUnsupportedTypesSerializer);
|
||||||
|
AZ_CLASS_ALLOCATOR_DECL;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
AZStd::string_view GetMessage() const override;
|
||||||
|
};
|
||||||
} // namespace AZ
|
} // namespace AZ
|
||||||
|
|||||||
Reference in New Issue
Block a user