Skip to content
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

Why does a key with an empty json array get ommitted from a message? #271

Open
camsoupa opened this issue Mar 28, 2015 · 1 comment
Open

Comments

@camsoupa
Copy link

Why does a key with an empty json array get ommitted from a message?

// node.js
remote({ key1: 1, key2: [] })

// Browser
THRUST.remote.listen(function (msg) {
 // key2 ommitted! msg == { key1: 1 } 
  ...
})
@miketheprogrammer
Copy link
Contributor

I would always recommend serializing js objects into json before sending
them. A message is really meant to be a string.
On Mar 28, 2015 4:38 PM, "camsoupa" [email protected] wrote:

Why does a key with an empty json array get ommitted from a message?

// node.js

remote({ key1: 1, key2: [] })
// Browser
THRUST.remote.listen(function (msg) {
// key2 ommitted! msg == { key1: 1 }
...
})


Reply to this email directly or view it on GitHub
#271.

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

No branches or pull requests

2 participants