Giter Club home page Giter Club logo

protountyped's People

Contributors

ocoanet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

protountyped's Issues

ProtoObject.ToString() truncates the message

The parsed object list looks fine, but ToString() truncates at some point.
Can you fix the issue and release a new package please.

Truncated message:

message {
- 1 = message {
    - 1 = message {
        - 1 = message {
            - 1 = 1
            - 3 = 10
            - 4 = 5
            }
        - 2 = message {
            - 2 = 5
            }
        - 3 = message {
            - 1 = 1
            - 3 = 10
            - 4 = 5
            }
        - 4 = message {
            - 1 = 1
            - 3 = 10
            - 4 = 5
            }
        - 5 = message {
            - 1 = 1
            - 3 = 10
            - 4 = 5
            - 5 = 10
            }
        - 6 = message {
            - 1 = 1
            - 3 = 10
            - 4 = 5
            - 5 = 10
            }
        }
    - 2 = message {
        - 1 = array [
            - 0 = message {
                - 1 = 10000
                - 2 = 5
                - 4 = "����

Base 64 encoded original message:
message_base64.txt

System.Byte[] is not converted to string

The following input data produces a System.Byte[] field not converted to string correctly.
Can be converted to hex string.

Input:
CgUI6DYQAhI4mpmZmZmZuT8AAAAAAADgPwAAAAAAAPA/AAAAAAAA+D8AAAAAAAAAQAAAAAAAAAhAAAAAAAAAEEAYASGamZmZmZm5PyoECAIQMioECAUQfSoFCAoQ+gEqBQgUEPQDKgUIMhDiCSoFCGQQxBMqBgjIARCIJyoHCOgHEKjDASoHCNAPENCGAyoHCJBOEJChDyoICKCcARCgwh4qCAjQhgMQ0KVMMDI4AUINCgFSCgEqCgEqEPurAkINCgFSCgFSCgEqEMS0AkINCgFSCgFSCgFSEI29AkINCgFCCgFCCgFCENbFAkINCgExCgFDCgExEJ/OAkINCgExCgFECgExEOjWAkINCgExCgFICgExELHfAkINCgExCgFTCgExEPrnAkINCgExCgExCgExEMKsA0INCgEyCgFDCgEyEK/XA0INCgEyCgFECgEyEJyCBEINCgEyCgFICgEyEImtBEINCgEyCgFTCgEyEPbXBEINCgEyCgEyCgEyENCtBUINCgEzCgFDCgEzEL3YBUINCgEzCgFECgEzEKqDBkINCgEzCgFICgEzEJeuBkINCgEzCgFTCgEzEITZBkINCgEzCgEzCgEzELiECEINCgFDCgFDCgFDEJLaCEINCgFECgFECgFEEOyvCUINCgFICgFICgFIEKDbCkINCgFTCgFTCgFTEPqwC0INCgFVCgFVCgFVEJDkGkINCgE3CgE3CgE3EKDINUIOCgFaCgFaCgFaEKDpiwJKDAoBUgoBKgoBKhDcC0oMCgFSCgFSCgEqEIgOSgwKAVIKAVIKAVIQtBBKDAoBQgoBQgoBQhDgEkoMCgExCgFDCgExEIwVSgwKATEKAUQKATEQuBdKDAoBMQoBSAoBMRCmHUoMCgExCgFTCgExEJQjSgwKATEKATEKATEQgilKDAoBMgoBQwoBMhDwLkoMCgEyCgFECgEyEMw6SgwKATIKAUgKATIQqEZKDAoBMgoBUwoBMhCEUkoMCgEyCgEyCgEyEOBdSgwKATMKAUMKATMQvGlKDAoBMwoBRAoBMxCYdUoNCgEzCgFICgEzEOSvAUoNCgEzCgFTCgEzELDqAUoNCgEzCgEzCgEzEPykAkoNCgFDCgFDCgFDEMjfAkoNCgFECgFECgFEEODUA0oNCgFICgFICgFIEPCTCUoNCgFTCgFTCgFTEOjdDUoNCgFVCgFVCgFVEOCnEkoNCgE3CgE3CgE3ELDjLUoOCgFaCgFaCgFaEMCNtwFQAQ==

Output:

message {
- 1 = message {
    - 1 = 7016
    - 2 = 2
    }
- 2 = System.Byte[]
- 3 = 1
- 4 = 0.1
- 5 = array [
    - 0 = message {
        - 1 = 2
        - 2 = 50
        }
    - 1 = message {
        - 1 = 5
        - 2 = 125
        }
    - 2 = message {
        - 1 = 10
        - 2 = 250
        }
    - 3 = message {
        - 1 = 20
        - 2 = 500
        }
    - 4 = message {
        - 1 = 50
        - 2 = 1250
        }
    - 5 = message {
        - 1 = 100
        - 2 = 2500
        }
    - 6 = message {
        - 1 = 200
        - 2 = 5000
        }
    - 7 = message {
        - 1 = 1000
        - 2 = 25000
        }
    - 8 = message {
        - 1 = 2000
        - 2 = 50000
        }
    - 9 = message {
        - 1 = 10000
        - 2 = 250000
        }
    - 10 = message {
        - 1 = 20000
        - 2 = 500000
        }
    - 11 = message {
        - 1 = 50000
        - 2 = 1250000
        }
    ]
- 6 = 50
- 7 = 1
- 8 = array [
    - 0 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "*"
            - 2 = "*"
            ]
        - 2 = 38395
        }
    - 1 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "R"
            - 2 = "*"
            ]
        - 2 = 39492
        }
    - 2 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "R"
            - 2 = "R"
            ]
        - 2 = 40589
        }
    - 3 = message {
        - 1 = array [
            - 0 = "B"
            - 1 = "B"
            - 2 = "B"
            ]
        - 2 = 41686
        }
    - 4 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "C"
            - 2 = "1"
            ]
        - 2 = 42783
        }
    - 5 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "D"
            - 2 = "1"
            ]
        - 2 = 43880
        }
    - 6 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "H"
            - 2 = "1"
            ]
        - 2 = 44977
        }
    - 7 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "S"
            - 2 = "1"
            ]
        - 2 = 46074
        }
    - 8 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "1"
            - 2 = "1"
            ]
        - 2 = 54850
        }
    - 9 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "C"
            - 2 = "2"
            ]
        - 2 = 60335
        }
    - 10 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "D"
            - 2 = "2"
            ]
        - 2 = 65820
        }
    - 11 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "H"
            - 2 = "2"
            ]
        - 2 = 71305
        }
    - 12 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "S"
            - 2 = "2"
            ]
        - 2 = 76790
        }
    - 13 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "2"
            - 2 = "2"
            ]
        - 2 = 87760
        }
    - 14 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "C"
            - 2 = "3"
            ]
        - 2 = 93245
        }
    - 15 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "D"
            - 2 = "3"
            ]
        - 2 = 98730
        }
    - 16 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "H"
            - 2 = "3"
            ]
        - 2 = 104215
        }
    - 17 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "S"
            - 2 = "3"
            ]
        - 2 = 109700
        }
    - 18 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "3"
            - 2 = "3"
            ]
        - 2 = 131640
        }
    - 19 = message {
        - 1 = array [
            - 0 = "C"
            - 1 = "C"
            - 2 = "C"
            ]
        - 2 = 142610
        }
    - 20 = message {
        - 1 = array [
            - 0 = "D"
            - 1 = "D"
            - 2 = "D"
            ]
        - 2 = 153580
        }
    - 21 = message {
        - 1 = array [
            - 0 = "H"
            - 1 = "H"
            - 2 = "H"
            ]
        - 2 = 175520
        }
    - 22 = message {
        - 1 = array [
            - 0 = "S"
            - 1 = "S"
            - 2 = "S"
            ]
        - 2 = 186490
        }
    - 23 = message {
        - 1 = array [
            - 0 = "U"
            - 1 = "U"
            - 2 = "U"
            ]
        - 2 = 438800
        }
    - 24 = message {
        - 1 = array [
            - 0 = "7"
            - 1 = "7"
            - 2 = "7"
            ]
        - 2 = 877600
        }
    - 25 = message {
        - 1 = array [
            - 0 = "Z"
            - 1 = "Z"
            - 2 = "Z"
            ]
        - 2 = 4388000
        }
    ]
- 9 = array [
    - 0 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "*"
            - 2 = "*"
            ]
        - 2 = 1500
        }
    - 1 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "R"
            - 2 = "*"
            ]
        - 2 = 1800
        }
    - 2 = message {
        - 1 = array [
            - 0 = "R"
            - 1 = "R"
            - 2 = "R"
            ]
        - 2 = 2100
        }
    - 3 = message {
        - 1 = array [
            - 0 = "B"
            - 1 = "B"
            - 2 = "B"
            ]
        - 2 = 2400
        }
    - 4 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "C"
            - 2 = "1"
            ]
        - 2 = 2700
        }
    - 5 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "D"
            - 2 = "1"
            ]
        - 2 = 3000
        }
    - 6 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "H"
            - 2 = "1"
            ]
        - 2 = 3750
        }
    - 7 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "S"
            - 2 = "1"
            ]
        - 2 = 4500
        }
    - 8 = message {
        - 1 = array [
            - 0 = "1"
            - 1 = "1"
            - 2 = "1"
            ]
        - 2 = 5250
        }
    - 9 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "C"
            - 2 = "2"
            ]
        - 2 = 6000
        }
    - 10 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "D"
            - 2 = "2"
            ]
        - 2 = 7500
        }
    - 11 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "H"
            - 2 = "2"
            ]
        - 2 = 9000
        }
    - 12 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "S"
            - 2 = "2"
            ]
        - 2 = 10500
        }
    - 13 = message {
        - 1 = array [
            - 0 = "2"
            - 1 = "2"
            - 2 = "2"
            ]
        - 2 = 12000
        }
    - 14 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "C"
            - 2 = "3"
            ]
        - 2 = 13500
        }
    - 15 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "D"
            - 2 = "3"
            ]
        - 2 = 15000
        }
    - 16 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "H"
            - 2 = "3"
            ]
        - 2 = 22500
        }
    - 17 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "S"
            - 2 = "3"
            ]
        - 2 = 30000
        }
    - 18 = message {
        - 1 = array [
            - 0 = "3"
            - 1 = "3"
            - 2 = "3"
            ]
        - 2 = 37500
        }
    - 19 = message {
        - 1 = array [
            - 0 = "C"
            - 1 = "C"
            - 2 = "C"
            ]
        - 2 = 45000
        }
    - 20 = message {
        - 1 = array [
            - 0 = "D"
            - 1 = "D"
            - 2 = "D"
            ]
        - 2 = 60000
        }
    - 21 = message {
        - 1 = array [
            - 0 = "H"
            - 1 = "H"
            - 2 = "H"
            ]
        - 2 = 150000
        }
    - 22 = message {
        - 1 = array [
            - 0 = "S"
            - 1 = "S"
            - 2 = "S"
            ]
        - 2 = 225000
        }
    - 23 = message {
        - 1 = array [
            - 0 = "U"
            - 1 = "U"
            - 2 = "U"
            ]
        - 2 = 300000
        }
    - 24 = message {
        - 1 = array [
            - 0 = "7"
            - 1 = "7"
            - 2 = "7"
            ]
        - 2 = 750000
        }
    - 25 = message {
        - 1 = array [
            - 0 = "Z"
            - 1 = "Z"
            - 2 = "Z"
            ]
        - 2 = 3000000
        }
    ]
- 10 = 1
}

Confusing change in object formatting in v2

The changed formatting of objects in v2 is confusing. It converts an empty object to an empty string now.
Before v2 it was possible to understand that a field holds an empty object with optional fields but now it looks like a string.

I claim it should be an object and not a string because on the messages I'm trying to decode I see that this field, depending on a condition, sometimes contains an object with values and sometimes it's empty when those values are not specified.

Base64 encoded message:
CgAQGBogZDg0MzJmYzEwOTQyNGM1NWE5ZTAxYmIyYWFmNjUzMDk=

Decoded as follows on v1.0.1:

message {
- 1 = message {
    }
- 2 = 24
- 3 = "d8432fc109424c55a9e01bb2aaf65309"
}

And became as follows on v2.0.0:

message {
- 1 = ""
- 2 = 24
- 3 = "d8432fc109424c55a9e01bb2aaf65309"
}

Seems v1.0.1 decoding is correct.

Field number and ordering

As show in the output below the 2nd item of the 1st object has its field numbers in wrong order. 6 is expected to come before 7.
Why this happens?

Message in Base64 (updated):
Co4DCuACZW1semZERjhOak41U2tabGNFOUpRakk0T1ZkVmNuSTFRamhxTVVka2JWVmtkWGwzU0ZSMlh6Vk5kMk5PUldOWllVVnBia3B0TWpWd2RuVmtaelpRVEdzdFUxZEhkVkpwVTB0SVkwaDBVR1JzTm5FeU1YbFZOR1F0VWtsa1V6WllYM0J3T0VNeVJEQXhZMHhKTlRkU1ZIUTRRekI0WWpkdU9YRmFTa293YjFWQmVXUkdaMWhDVDB0RFJETlZNbTR4U1VGNlkxTjJSbFF6Y1dOZmQybGtRVkZJYVhrMGJtZHBOMUZUVTAxcE1IVkRlbWxPV0Y5Q1UzWndOekpWVkVSaVIyZ3lNV0prVUhWQlprOXpjV2czUXpjeVFWVkZZVGRXUVdsTGRHZFlRalpDUVZCeE1FTklkR2hHTkhOTlUzVmZZVmhwYlRSalVuVkhTbWwzZHpOR1VXUkRkamd3VGc9PRILODgxNTQ4MzU2MDAaEDFhOGMyZGVhNzA2ZGM3MGQiCjE2ODYyNjc3OTMQ1ober8gCIB06IDg0OTk2OTYwMjU4OWI3YjRmZjIxMzVmZTM4MWVkMmY3

Output:

message {
- 1 = message {
    - 1 = "emlzfDF8NjN5SkZlcE9JQjI4OVdVcnI1QjhqMUdkbVVkdXl3SFR2XzVNd2NORWNZYUVpbkptMjVwdnVkZzZQTGstU1dHdVJpU0tIY0h0UGRsNnEyMXlVNGQtUklkUzZYX3BwOEMyRDAxY0xJNTdSVHQ4QzB4YjduOXFaSkowb1VBeWRGZ1hCT0tDRDNVMm4xSUF6Y1N2RlQzcWNfd2lkQVFIaXk0bmdpN1FTU01pMHVDemlOWF9CU3ZwNzJVVERiR2gyMWJkUHVBZk9zcWg3QzcyQVVFYTdWQWlLdGdYQjZCQVBxMENIdGhGNHNNU3VfYVhpbTRjUnVHSml3dzNGUWRDdjgwTg=="
    - 2 = message {
        - 7 = 56
        - 6 = 1.4000739925779533E-76
        }
    - 3 = "1a8c2dea706dc70d"
    - 4 = "1686267793"
    }
- 2 = 88146936662
- 4 = 29
- 7 = "849969602589b7b4ff2135fe381ed2f7"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.