-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Server: Serialize Object controls as JSON over the wire #11703
Conversation
case 'object': | ||
// send objects as JSON strings | ||
storyArgs[key] = JSON.stringify(argValue); | ||
break; |
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.
this is the fix
@@ -34,7 +34,8 @@ | |||
"colour": "deeppink", | |||
"today": "Jan 20 2017 GMT+0", | |||
"items": ["Laptop", "Book", "Whiskey"], | |||
"nice": true | |||
"nice": true, | |||
"other": {"hair": "brown", "eyes": "blue"} |
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.
wasn't testing object controls in the example app
@@ -6,6 +6,7 @@ | |||
- style = `border: 2px dotted ${colour}; padding: 8px 22px; border-radius: 8px`; | |||
- today = new Date(today); | |||
- items = items.split(','); | |||
- other = JSON.parse(other) |
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.
proves we have it as json that we can parse
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.
LGTM!
What I did
Fix the serialization of objects as JSON over the wire that was missed in the refactor of knobs to controls #11658
Cleaned up some cruft along the way.