We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1d9934 commit 70bc223Copy full SHA for 70bc223
2 files changed
include/msgpack.hrl
@@ -81,7 +81,7 @@
81
82
-else.
83
-record(options_v3, {
84
- interface = map :: format_type(),
+ interface = jiffy :: format_type(),
85
map_unpack_fun = fun msgpack_unpacker:unpack_map/3 ::
86
msgpack_map_unpacker(),
87
impl = erlang :: erlang | nif,
test/msgpack_test.erl
@@ -145,12 +145,25 @@ issue_jiffy_5_test() ->
145
146
147
issue_27_test_() ->
148
- [?_assertEqual({ok, null},
+ [
149
+ %% nil(jiffy) => nil(msgpack) => null(jsx)
150
+ ?_assertEqual({ok, null},
151
msgpack:unpack(msgpack:pack(nil), [{format,jsx}])),
152
+
153
+ %% nil(jiffy) => nil(msgpack) => nil(jiffy)
154
?_assertEqual({ok, nil},
155
msgpack:unpack(msgpack:pack(nil, [{format,jiffy}]))),
156
157
158
+ %% null(jsx) => nil(msgpack) => nil(jiffy)
159
+ ?_assertEqual({ok, nil},
160
+ msgpack:unpack(msgpack:pack(null, [{format,jsx}]))),
161
162
+ %% null(jiffy-atom) => <<null>>(msgpack-binary) => <<"nil">>
163
?_assertEqual({ok, <<"null">>},
164
msgpack:unpack(msgpack:pack(null, [{allow_atom,pack}]))),
165
166
+ %% nil(jsx-atom) => <<nil>>(msgpack-binary) => <<"nil">>
167
?_assertEqual({ok, <<"nil">>},
168
msgpack:unpack(msgpack:pack(nil,
169
[{format,jsx},{allow_atom,pack}])))].
0 commit comments