-
Notifications
You must be signed in to change notification settings - Fork 0
Fix binary string issue #10
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
Open
smittytone
wants to merge
23
commits into
develop
Choose a base branch
from
fix-binary-string-issue
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2b743aa
Code tidy; bump to 2.0.1; throw on bad unicode
smittytone 519c4d7
Add base64encoding for blobs
smittytone 3d63331
Fix incorrect var names
smittytone 507e637
Update README.md
smittytone 32f76f1
Update JSONEncoder.class.nut
smittytone cbac91f
Update README.md
smittytone 2d3ad00
Add new private method comments
smittytone 8270efb
Update examples
smittytone 86efb8e
Add blob example
smittytone 161d29f
Add examples, extra test
smittytone 5a76238
Update blob.device.test.nut
smittytone 261c39f
Update Basic.agent.test.nut
smittytone 7a5c7b2
Update tests for v3.0.0 operation on blobs
smittytone 51af2a4
Update Basic.agent.test.nut
smittytone 7af8337
Update examples: library v3.0.0
smittytone 8f5bcb9
Revise to display binary strings
smittytone 0c48d87
Update README.md
smittytone a8a5bf7
Remove old tests
smittytone 61c868c
Adjust tests for new lib version
smittytone 0ad4a0e
Update Basic.device.test.nut
smittytone bbd0a60
Update examples
smittytone 66351cc
Add comments
smittytone 9d034e7
Bump to 3.0.0; fix issues
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#require "JSONEncoder.class.nut:2.1.0" | ||
|
||
/** | ||
* Example of blob serialization | ||
*/ | ||
|
||
local b = blob(144); | ||
b.writestring("Welcome to the Electric Imp Dev Center. We’ve collected everything you’ll need to build great connected products with the Electric Imp Platform."); | ||
|
||
local uniStr1 = "💾❤️😎🎸"; | ||
local uniStr2 = "\xF0\x9F\x98\x9C"; | ||
|
||
local j = JSONEncoder.encode({"binary_data":b, "uni_strings": [{"uni_string_one":uniStr}, {"uni_string_two":uniStr2}]}); | ||
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. typo - ERROR: the index 'uniStr' does not exist |
||
server.log(j); | ||
|
||
// Logs: | ||
// {"uni_strings":[{"uni_string_one":"💾❤️😎🎸"},{"uni_string_two":"😜"}],"binary_data":"Welcome to the Electric Imp Dev Center. We’ve collected everything you’ll need to build great connected products with the Electric Imp Platform."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
wrong version number