Skip to content

Android: How to convert message pack binary data into readable JSON string? #434

Description

@iraj-wisilica

I already have JSON parsing module and works fine. Recently my back end team added support for message pack. So I am planning to convert the message pack data into JSON string so that I can keep the existing parsing logic.

Message Pack response from PHP back end.

response

The unpacker produces the following output.

Unpack: -17
Unpack: ��Response��Status��a
Unpack: 112
Unpack: 105
Unpack: 73
Unpack: 100
Unpack: 16
Unpack: -17
Unpack: �statusCode�N!�statusMessag
Unpack: 101
Unpack: -17
Unpack: �device get api is success�Da
Unpack: 116
Unpack: 97
Unpack: -17
Unpack: ��deviceCount�0�deviceDet
Unpack: 97
Unpack: 105
Unpack: 108
Unpack: 115
Unpack: -17
Unpack: ���message�No data found�

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions