Skip to content

Commit

Permalink
Update doc comments and Ballerina tomls
Browse files Browse the repository at this point in the history
  • Loading branch information
SasinduDilshara committed Apr 3, 2024
1 parent b4cce5c commit 81e9642
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ballerina/read.bal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public type JsonPathRawTemplate object {
public JsonPathValue[] insertions;
};

# Extract details from the given JSON value using the provided query template expression
# Extract details from the given JSON value using the provided query template expression.
#
# ```ballerina
# read({id: 1, "name": "John Doe"}, `$.name`) => "John Doe"
Expand All @@ -47,7 +47,7 @@ class JsonPathRawTemplateImpl {
}
}

# Extract details from the given JSON value using the provided query expression
# Extract details from the given JSON value using the provided query expression.
# + 'json - JSON value
# + query - JSON path expression
# + return - extracted details as JSON value, a jsonpath:Error otherwise
Expand Down
10 changes: 10 additions & 0 deletions ballerina/tests/jsonpath_complex_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -813,3 +813,13 @@ function testGeneralJsonPathExpresions() returns error? {
result = check read(j5, `@`);
test:assertEquals(result, j5);
}

type A JsonPathRawTemplate;

@test:Config {}
function testTypeReferencetype() returns error? {
A path = `$`;

json result = check read(j5, path);
test:assertEquals(result, j5);
}
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "data.jsondata"
version = "0.1.0"
version = "@toml.version@"
authors = ["Ballerina"]
keywords = ["json", "json path", "json-transform", "json transform", "json to json", "json-convert", "json convert"]
repository = "https://github.com/ballerina-platform/module-ballerina-data.jsondata"
Expand Down

0 comments on commit 81e9642

Please sign in to comment.