Closed
Description
I have that class.
Article {
@Expose({ name: "_id", toClassOnly: true })
private id: string;
}
In comming Json:
{
"_id":"asdasdas"
}
I have _id
, but I have to return in response Json id
, like
{
"id":"asdsdads"
}
Function: classToPlain(article)
returns that json:
{
"_id":"asdasdas"
}
but when I view variable article, structure are correct.
Why function classToPlain ignoring @Expose({ name: "_id", toClassOnly: true })