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

Inconsistent naming case using --json #2804

Open
jcamiel opened this issue May 19, 2024 · 3 comments
Open

Inconsistent naming case using --json #2804

jcamiel opened this issue May 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented May 19, 2024

--json is producing a file which use camelCase and snakeCase :

          "request": {
            "cookies": [],
            "headers": [
              {
                "name": "Host",
                "value": "google.fr"
              },
              {
                "name": "Accept",
                "value": "*/*"
              },
              {
                "name": "User-Agent",
                "value": "hurl/5.0.0-SNAPSHOT"
              }
            ],
            "method": "GET",
            "queryString": [],
            "url": "https://google.fr/"
          },

And

            "certificate": {
              "expire_date": "2024-07-29 14:54:21 UTC",
              "issue": "C = US, O = Google Trust Services LLC, CN = GTS CA 1C3",
              "serial_number": "f3:eb:d0:e9:49:3e:8c:3e:10:8a:74:c4:33:e2:66:2f",
              "start_date": "2024-05-06 14:54:22 UTC",
              "subject": "CN = *.google.fr"
            },

          "timings": {
            "app_connect": 59653,
            "begin_call": "2024-05-19T15:09:07.805338Z",
            "connect": 24655,
            "end_call": "2024-05-19T15:09:07.897452Z",
            "name_lookup": 3617,
            "pre_transfer": 59883,
            "start_transfer": 91551,
            "total": 91608
          }

We should choose a convention and stick to it.

(personal, but not strong, preference is snake_case)

@jcamiel jcamiel added the enhancement New feature or request label May 19, 2024
@jcamiel
Copy link
Collaborator Author

jcamiel commented May 19, 2024

@lambrospetrou we'll certainly fix some field names for --json and for --report-json for the next Hurl version (once we choose a casing)

@lambrospetrou
Copy link

Thank you for letting me know :)

@fabricereix
Copy link
Collaborator

camelCase names (such as queryString) came originally from the HAR format (http://www.softwareishard.com/blog/har-12-spec).
It makes indeed sense to stick to only one format, I also prefer the snake_case one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants