Convert JSON to MessagePack

Dec 10, 2018 0 Comments

JSON to MessagePack converter is the world's first JSON to MessagePack online converter. Nested JSON documents are also supported. Checkout the examples.



Input: Paste JSON content below



Settings

Output: Converted MessagePack


MessagePack to JSON Converter

Visualize MessagePack encoded data (in HEX, UInt8Array, Base64 or Percent Encoding format) by converting it into JSON format

View Tool
Background Information

JavaScript Object Notation (JSON) pronounced as "Jason" is the de facto standard for data interchange on the web these days. It is a simple format that is easier to comprehend than XML. It also has less size than XML because of no closing tags. Interacting with JSON from JavaScript is extremely seamless. JSON format was first specified by Douglas Crockford in the early 2000s

MessagePack is an efficient binary serialization format which is similar to JSON but faster and smaller in size. It is just that it is not meant for the human eye.

Settings Explained

  • 1. Output Type

    The output type of the converted MessagePack data. You have the following options here:-

    Hex

    In Hex mode, the MessagePack bytes are converted to their two digit hex representation. You can include space between the individual bytes, wrap the output & convert the hex characters to uppercase.

    DD 00 00 00 01 DF 00 00 00 04 A4 6E 61 6D 65 AA 52 6F 62 69 
    6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 
    61 6E 61 67 65 72 A0 A6 73 61 6C 61 72 79 CC C8

    Base64

    In Base64 mode, the MessagePack bytes are converted to Base64 format.

    3QAAAAHfAAAABKRuYW1lqlJvYmluIEhvb2SqZGVwYXJ0bWVudKCnbWFuYWdl
    cqCmc2FsYXJ5zMg=

    UInt8 Array

    Here, the output is an array of 8 bit unsigned integers which can be used in programming languages such as JavaScript, Java, C#. You can delimit the numbers by space & wrap the output. Uppercase setting is not available because the output is comprised of digits only and there are no alphabets in the output.

    [221, 0, 0, 0, 1, 223, 0, 0, 0, 4, 164, 110, 97, 109, 101, 170, 82, 111, 98, 105, 
    110, 32, 72, 111, 111, 100, 170, 100, 101, 112, 97, 114, 116, 109, 101, 110, 116, 160, 167, 109, 
    97, 110, 97, 103, 101, 114, 160, 166, 115, 97, 108, 97, 114, 121, 204, 200]

    Bracketed Binary

    In this format, the binary characters are wrapped in their hex forms inside brackets

    Ý[0x00][0x00][0x00][0x01]ß[0x00][0x00][0x00][0x04][0xA4]nameªRobin[0x20]Hoodªdepartment[0xA0][0xA7]manager[0xA0][0xA6]salaryÌÈ

    Escaped Hex

    In this format, the binary characters are prefixed by \x followed by a two character Hex representation of the byte value

    Ý\x00\x00\x00\x01ß\x00\x00\x00\x04¤nameªRobin Hoodªdepartment §manager ¦salaryÌÈ

    Raw

    In this format, the binary characters are converted to ASCII. You may see non printable characters in the output which are hard to comprehend.

  • 2. Delimit By Space

    If selected, each hex digit is separated by a space for better readability. This is how hex editors usually show binary data. The Copy Output Button ignores this and copies the text without the spaces.
    This setting is only applicable for Hex & UInt8 Array output types.

    Delimit by Space On

    DD 00 00 00 01 DF 00 00 00 04 A4 6E 61 6D 65 AA 52 6F 62 69 
    6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 
    61 6E 61 67 65 72 A0 A6 73 61 6C 61 72 79 CC C8

    Delimit by Space Off

    DD00000001DF00000004A46E616D65AA526F62696E20486F6F64AA646570
    6172746D656E74A0A76D616E61676572A0A673616C617279CCC8
  • 3. Uppercase

    If selected, alphabets in the hex digits are converted to uppercase.
    This setting is only applicable for Hex output type.

    Uppercase On

    DD 00 00 00 01 DF 00 00 00 04 A4 6E 61 6D 65 AA 52 6F 62 69 
    6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 
    61 6E 61 67 65 72 A0 A6 73 61 6C 61 72 79 CC C8

    Uppercase Off

    dd 00 00 00 01 df 00 00 00 04 a4 6e 61 6d 65 aa 52 6f 62 69 
    6e 20 48 6f 6f 64 aa 64 65 70 61 72 74 6d 65 6e 74 a0 a7 6d 
    61 6e 61 67 65 72 a0 a6 73 61 6c 61 72 79 cc c8
  • 4. Prefix 0x

    If selected, each hex number is prefixed by 0x (as used in C and languages based on the C syntax).
    This option is only available when output is set to Hex mode & delimit by space is On.

    Prefix 0x On

    0xDD 0x00 0x00 0x00 0x01 0xDF 0x00 0x00 0x00 0x04 0xA4 0x6E 0x61 0x6D 0x65 0xAA 0x52 0x6F 0x62 0x69 
    0x6E 0x20 0x48 0x6F 0x6F 0x64 0xAA 0x64 0x65 0x70 0x61 0x72 0x74 0x6D 0x65 0x6E 0x74 0xA0 0xA7 0x6D 
    0x61 0x6E 0x61 0x67 0x65 0x72 0xA0 0xA6 0x73 0x61 0x6C 0x61 0x72 0x79 0xCC 0xC8

    Prefix 0x Off

    DD 00 00 00 01 DF 00 00 00 04 A4 6E 61 6D 65 AA 52 6F 62 69 
    6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 
    61 6E 61 67 65 72 A0 A6 73 61 6C 61 72 79 CC C8
  • 5. Split Long Lines

    If selected, lines longer than 60 characters are split into multiple lines. This is for readability purpose and again something how hex viewers/editors show binary data. The Copy Output Button ignores this and copies the text without the new lines. This option is only available when output is set to Hex, Base64 or UInt8 Array.

    Split Long Lines On

    DD 00 00 00 01 DF 00 00 00 03 A4 6E 61 6D 65 AA 52 6F 62 69 
    6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 
    61 6E 61 67 65 72 A0

    Split Long Lines Off

    DD 00 00 00 01 DF 00 00 00 03 A4 6E 61 6D 65 AA 52 6F 62 69 6E 20 48 6F 6F 64 AA 64 65 70 61 72 74 6D 65 6E 74 A0 A7 6D 61 6E 61 67 65 72 A0
 

Comments 0


History

Dec 10, 2018
Support for Raw ASCII output types
May 27, 2018
Support for Percent Encoding & Escaped Hex output types
Dec 30, 2017
Support for Base64, UInt8 Array & Bracketed Binary output types
Nov 3, 2017
Support for prefixing 0x
Oct 19, 2017
Array output mode
Oct 3, 2017
Tool Launched