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

Add nested JSON fields for = and := operators #9

Closed
talis-fb opened this issue Jan 27, 2024 · 0 comments · Fixed by #30
Closed

Add nested JSON fields for = and := operators #9

talis-fb opened this issue Jan 27, 2024 · 0 comments · Fixed by #30
Assignees
Labels
enhancement New feature or request 🦑 Large
Milestone

Comments

@talis-fb
Copy link
Owner

talis-fb commented Jan 27, 2024

The objective is to replicate this feature in HTTPie (https://httpie.io/docs/cli/nested-json).

  people[name]=Peter  \
  people[about][job]=dev \
  people[about][country]=Brazil \
  people[about][age]:=27 \
  people[skills]:=["Rust", "Python"]
---
{
    "people": {
        "name": "Peter",
        "about": {
            "job": "dev",
            "country": "Brazil",
            "age": 27
        },
        "skills": [
            "Rust",
            "Python"
        ]
    }
}

Additional Considerations:

  • Ensure that the introduced operator is clearly documented and explained in the treq documentation.
  • Conduct thorough testing to verify the accurate inference of JSON types and proper integration with the existing treq command.
  • Consider providing informative error messages in case of invalid JSON structures.
  • Note: It does NOT necessary add the building arrays through [] suffix like this FIRST EXAMPLE in httpie doc or this example...
search[keywords][]=APIs \
search[keywords][]=CLI
---------
{
 "search": {
        "keywords": [
            "APIs",
            "CLI"
        ],
    }
}

Only focus in define nested values in this task.

@talis-fb talis-fb added enhancement New feature or request 🦑 Large labels Jan 27, 2024
@talis-fb talis-fb added this to the v1.2.0 milestone Feb 2, 2024
@talis-fb talis-fb self-assigned this Feb 19, 2024
@talis-fb talis-fb modified the milestones: v1.2.0, TUI Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🦑 Large
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant