Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cross language demo]go language deserialize demo #128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Dec 17, 2022

  1. [cross language demo]go language deserialize demo

    File use:
    simple_serialize.cpp will serialize struct person and create a file which content is serialized string and it's name is example.txt.It also a demo which deserialize string to c language.
    
    go_deserialize.go is a demo that reads this file(example.txt)
    , which deserializes the string assignment into the struct.
    helintongh committed Dec 17, 2022
    Configuration menu
    Copy the full SHA
    7142834 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2022

  1. [cross language demo]go serialized string write to file and cpp read …

    …file deserialize to struct
    
    go_deserialize will create a file named golang_serialize.txt.
    read_from_other which source code is deserialize_from_other_language.cpp will read serialized string and deserialize string to cpp struct.
    
    the struct person meta json is following:
    
    {
       "hash_code": 2242444774,
       "struct_name": "person",
       "fileds": [
          {
             "field_name": "age",
             "field_type": "int32"
          },
          {
             "field_name": "name",
             "field_type": "string"
          }
       ]
    }
    helintongh committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    193fec3 View commit details
    Browse the repository at this point in the history