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

Support for Result method #61

Closed
thedevsaddam opened this issue Sep 22, 2019 · 0 comments
Closed

Support for Result method #61

thedevsaddam opened this issue Sep 22, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request Feature request

Comments

@thedevsaddam
Copy link
Owner

thedevsaddam commented Sep 22, 2019

Result will return static type instead of interface.

const json = `{"name":{"first":"Tom","last":"Hanks"},"age":61}`
result, err := gojsonq.New().JSONString(json).FindR("name.first")
if err != nil {
	log.Fatal(err)
}
name, _ := result.String()
fmt.Println(name)

Result may contains method like: String/Int/Int32/Int64/Uint/Uint32/Uint64/Float32/Float64/[]String/[]Int/[]Uint/[]Float32 etc method

Result method name may FindR/GetR etc

@thedevsaddam thedevsaddam added enhancement New feature or request Feature request labels Sep 22, 2019
@thedevsaddam thedevsaddam self-assigned this Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature request
Projects
None yet
Development

No branches or pull requests

1 participant