You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Properties with string literal types are serialized and deserialized as Object. This is caused by the Typescript compiler, which emits incorrect metadata information for these types. See microsoft/TypeScript#10809
For example, the following code will produce incorrect behavior if ReflectDecorators is used to automatically detect types:
This will raise a warning in the console however, indicating that the specified type does not match detected type:
@JsonMember: 'type' specified for 'Person.name' does not match detected type.
Since this otherwise potentially helpful warning only occurrs temporarily until the fix is shipped by Microsoft, no action will be done to suppress it in these cases.
The text was updated successfully, but these errors were encountered:
JohnWeisz
changed the title
Property with string literal type serializes as array
Property with string literal type serializes as 'Object'
Sep 9, 2016
Properties with string literal types are serialized and deserialized as
Object
. This is caused by the Typescript compiler, which emits incorrect metadata information for these types. See microsoft/TypeScript#10809For example, the following code will produce incorrect behavior if ReflectDecorators is used to automatically detect types:
The solution, until this is fixed by the TypeScript team, is to manually define the
type
setting:This will raise a warning in the console however, indicating that the specified type does not match detected type:
Since this otherwise potentially helpful warning only occurrs temporarily until the fix is shipped by Microsoft, no action will be done to suppress it in these cases.
The text was updated successfully, but these errors were encountered: