Skip to content

unstringify data field on read.#58

Open
yonghongren wants to merge 1 commit intoloopbackio:masterfrom
yonghongren:master
Open

unstringify data field on read.#58
yonghongren wants to merge 1 commit intoloopbackio:masterfrom
yonghongren:master

Conversation

@yonghongren
Copy link

When a model's field has no property definition, we unconditionally stringify the field on write.
If the field data is a string, it gets quoted again. On read we don't undo the stringification.
A string data field becomes a string with extra quotes. read & write need be symmetrical.

Description

Related issues

  • None

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

When a model's field has no property definition, we unconditionally stringify the field on write.
If the field data is a string, it gets quoted again. On read we don't undo the stringification.
A string data field becomes a string with extra quotes. read & write need be symmetrical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant