This repository has been archived by the owner on Dec 27, 2024. It is now read-only.
.fromJson
accepts property or field name when field
option is set on @Json
#121
Labels
To be honest, I'm not sure if this is a bug or not. I can't remember if I made an intentional design decision about this.
Revaluate this to determine what the behavior should be.
Steps to reproduce: (see
json.spec.ts
test for bug #121)result2
is set tonot-default-2
instead ofdefault
even though the@Json
decorator forsomeProperty
expects the field to besp
.If you provide
sp
, it works properly. The bug (? if it is a bug) is thatsomeProperty
also works when provided as a Json field to.fromJson
.Discovered when working on #96.
The text was updated successfully, but these errors were encountered: