Using MessagePack in my code to pass data

Hello !
I have data that is being passed constantly between the client and the server.
xml is too big for me so I looked around and found "Message Pack".
but I have some trouble implementing it.

how do I pack and transmit data like the following example?

personA:{
name:"john"
phone_number:"07548656"
address:"park road 4"
age: "44"
...
...
}
personA's dog:{
name:"doggy"
brand:"bulldog"
age:"4"
...
...
}

please help as I have no idea what is the best way to pack this sort of data and transmit it in a light and fast way .

thank you

The usual way is type/length. One byte for the type, one byte for the size, and the following data.
Topic archived. No new replies allowed.