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

JSON output loses field identification information #519

Open
mkurittu opened this issue Jun 10, 2023 · 0 comments
Open

JSON output loses field identification information #519

mkurittu opened this issue Jun 10, 2023 · 0 comments

Comments

@mkurittu
Copy link

message Test {
	int32 first = 1; //!First
        int32 third = 3; //!Third
	int32 secord = 2;  //!Second
}

outputs

      "messages": [
        {
          "name": "Test",
          "longName": "Test",
          "fullName": ".Test",
          "description": "",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "first",
              "description": "!First",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": ""
            },
            {
              "name": "third",
              "description": "!Third",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": ""
            },
            {
              "name": "secord",
              "description": "!Second",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": ""
            }
          ]
        }

Enums have kind of similar representation already. Would it be possible to have such in messages too?

"enums": [
        {
          "name": "eTest",
          "longName": "eTest",
          "fullName": ".eTest",
          "description": "",
          "values": [
            {
              "name": "val0",
              "number": "0",
              "description": ""
            },
            {
              "name": "val2",
              "number": "2",
              "description": ""
            },
            {
              "name": "val1",
              "number": "1",
              "description": ""
            }
          ]
        }
      ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant