Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

New msg object initialize with from_json, not all data is getting updated #253

Open
@vbipin

Description

@vbipin

When creating a new msg object and using from_json to fill the data, all of the json data is not getting updated. Is there an easy way to solve this.
I am using the pycrate 0.7 and python 3.11

  1. Create a sample json text to use.
pdu = unhexlify( '074300035200c2' ) # EMM Attach Complete
m, e = parse_NAS_MT(pdu)
att_complete_json = m.to_json()
print( att_complete_json )
  1. I want to create a new message with this json
new_msg = EMMAttachComplete()
new_msg.from_json( att_complete_json )
print( new_msg.to_json() )

The new_msg json is different and also the new_msg.to_bytes()

print ( hexlify( new_msg.to_bytes() ))
"07430003000000" this is different from the starting pdu.

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