-
Notifications
You must be signed in to change notification settings - Fork 869
unserialization: Documented allowed-classes option with enums #5585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -816,6 +816,11 @@ print serialize(Suit::Hearts); | |||||
| On deserialization, if an enum and case cannot be found to match a serialized | ||||||
| value a warning will be issued and &false; returned.</para> | ||||||
|
|
||||||
| <para> | ||||||
| The <literal>allowed_classes</literal> option of | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Not sure about this one, but
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There isn't really a policy for this. It is done, but sometimes.. and mostly for cases like "0" not really for options or arguments. So I am more leaning towards omitting in this specific case. |
||||||
| <function>unserialize</function> does not affect enums. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
And ditto in the other file. |
||||||
| </para> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| <para> | ||||||
| If a Pure Enum is serialized to JSON, an error will be thrown. If a Backed Enum | ||||||
| is serialized to JSON, it will be represented by its scalar value only, in the | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.