You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,24 @@ and typical short strings only require an extra byte in addition to the strings
8
8
If you ever wished to use JSON for convenience (storing an image with metadata) but could
9
9
not for technical reasons (binary data, size, speed...), MessagePack is a perfect replacement.
10
10
11
-
require 'msgpack'
12
-
msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
13
-
MessagePack.unpack(msg) #=> [1,2,3]
11
+
```ruby
12
+
require'msgpack'
13
+
msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
14
+
MessagePack.unpack(msg) #=> [1,2,3]
15
+
```
16
+
17
+
Add msgpack to your Gemfile to install with Bundler:
18
+
19
+
```ruby
20
+
# Gemfile
21
+
gem 'msgpack'
22
+
```
14
23
15
-
Use RubyGems to install:
24
+
Or, use RubyGems to install:
16
25
17
26
gem install msgpack
18
27
19
-
or build msgpack-ruby and install:
28
+
Or, build msgpack-ruby and install from a checked-out msgpack-ruby repository:
20
29
21
30
bundle
22
31
rake
@@ -27,11 +36,11 @@ or build msgpack-ruby and install:
27
36
28
37
* Create REST API returing MessagePack using Rails + [RABL](https://github.com/nesquena/rabl)
29
38
* Store objects efficiently serialized by msgpack on memcached or Redis
30
-
* In fact Redis supports msgpack in [EVAL-scripts](http://redis.io/commands/eval)
39
+
* In fact Redis supports msgpack in [EVAL-scripts](https://redis.io/docs/latest/commands/eval/)
31
40
* Upload data in efficient format from mobile devices such as smartphones
32
41
* MessagePack works on iPhone/iPad and Android. See also [Objective-C](https://github.com/msgpack/msgpack-objectivec) and [Java](https://github.com/msgpack/msgpack-java) implementations
33
42
* Design a portable protocol to communicate with embedded devices
34
-
* Check also [Fluentd](http://fluentd.org/) which is a log collector which uses msgpack for the log format (they say it uses JSON but actually it's msgpack, which is compatible with JSON)
43
+
* Check also [Fluentd](https://www.fluentd.org) which is a log collector which uses msgpack for the log format (they say it uses JSON but actually it's msgpack, which is compatible with JSON)
35
44
* Exchange objects between software components written in different languages
36
45
* You'll need a flexible but efficient format so that components exchange objects while keeping compatibility
37
46
@@ -128,9 +137,9 @@ being serialized altogether by throwing an exception:
0 commit comments