From 4c9de501a26f27fbf6110bfb7947a51f666a982c Mon Sep 17 00:00:00 2001 From: Sasindu Alahakoon Date: Wed, 18 Sep 2024 11:37:04 +0530 Subject: [PATCH] Rename bbes includes `converting` --- .../casting_json_to_user_defined_type.md | 2 +- .../convert_from_table_and_xml_to_json.bal} | 0 .../convert_from_table_and_xml_to_json.md} | 6 +++--- .../convert_from_table_and_xml_to_json.metatags} | 0 .../convert_from_table_and_xml_to_json.out} | 2 +- .../convert_from_user_defined_type_to_json.bal} | 0 .../convert_from_user_defined_type_to_json.md} | 4 ++-- .../convert_from_user_defined_type_to_json.metatags} | 0 .../convert_from_user_defined_type_to_json.out} | 2 +- examples/index.json | 4 ++-- examples/json-numbers/json_numbers.md | 2 +- examples/json-type/json_type.md | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename examples/{converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.bal => convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.bal} (100%) rename examples/{converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.md => convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.md} (64%) rename examples/{converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.metatags => convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.metatags} (100%) rename examples/{converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.out => convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.out} (61%) rename examples/{converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.bal => convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.bal} (100%) rename examples/{converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.md => convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.md} (85%) rename examples/{converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.metatags => convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.metatags} (100%) rename examples/{converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.out => convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.out} (62%) diff --git a/examples/casting-json-to-user-defined-type/casting_json_to_user_defined_type.md b/examples/casting-json-to-user-defined-type/casting_json_to_user_defined_type.md index e56ebf9ed2..2a8d9f9329 100644 --- a/examples/casting-json-to-user-defined-type/casting_json_to_user_defined_type.md +++ b/examples/casting-json-to-user-defined-type/casting_json_to_user_defined_type.md @@ -14,5 +14,5 @@ Casting immutable values will work. However, it does not do numeric conversions. - [Open records](/learn/by-example/open-records/) - [Control openness](/learn/by-example/controlling-openness/) - [Anydata type](/learn/by-example/anydata-type/) -- [Converting from JSON to user defined type with langlib functions](/learn/by-example/converting-from-json-to-user-defined-type-with-langlib-functions/) +- [Convert from JSON to user defined type with langlib functions](/learn/by-example/convert-from-json-to-user-defined-type-with-langlib-functions/) - [Check expression](/learn/by-example/check-expression/) \ No newline at end of file diff --git a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.bal b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.bal similarity index 100% rename from examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.bal rename to examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.bal diff --git a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.md b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.md similarity index 64% rename from examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.md rename to examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.md index d6c6eb6836..5f4992f658 100644 --- a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.md +++ b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.md @@ -1,10 +1,10 @@ -# Converting from `table` and `xml` to JSON +# Convert from `table` and `xml` to JSON `toJson()` recursively converts `anydata` to `json`. Table values are converted to `json` arrays and `xml` values are converted to strings. -::: code converting_from_table_and_xml_to_json.bal ::: +::: code convert_from_table_and_xml_to_json.bal ::: -::: out converting_from_table_and_xml_to_json.out ::: +::: out convert_from_table_and_xml_to_json.out ::: ## Related links - [JSON type](/learn/by-example/json-type) diff --git a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.metatags b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.metatags similarity index 100% rename from examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.metatags rename to examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.metatags diff --git a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.out b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.out similarity index 61% rename from examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.out rename to examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.out index 294baf8fa6..c50a99e5b0 100644 --- a/examples/converting-from-table-and-xml-to-json/converting_from_table_and_xml_to_json.out +++ b/examples/convert-from-table-and-xml-to-json/convert_from_table_and_xml_to_json.out @@ -1,4 +1,4 @@ -$ bal run converting_from_table_and_xml_to_json.bal +$ bal run convert_from_table_and_xml_to_json.bal true [{"id":1,"name":"John"},{"id":2,"name":"Sam"}] true diff --git a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.bal b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.bal similarity index 100% rename from examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.bal rename to examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.bal diff --git a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.md b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.md similarity index 85% rename from examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.md rename to examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.md index acbd54f8cb..e417031391 100644 --- a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.md +++ b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.md @@ -4,9 +4,9 @@ Conversion of a `json` value to JSON format is straightforward. Converting from In many cases, the conversion happens automatically when the user-defined type is a subtype of JSON as well as of `anydata`. With tables, XML or records that are open to `anydata` use `toJson()` to convert `anydata` to `json`. APIs that generate JSON typically accept `anydata` and automatically apply `toJson()`. -::: code converting_from_user_defined_type_to_json.bal ::: +::: code convert_from_user_defined_type_to_json.bal ::: -::: out converting_from_user_defined_type_to_json.out ::: +::: out convert_from_user_defined_type_to_json.out ::: ## Related links - [JSON type](/learn/by-example/json-type/) diff --git a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.metatags b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.metatags similarity index 100% rename from examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.metatags rename to examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.metatags diff --git a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.out b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.out similarity index 62% rename from examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.out rename to examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.out index bcb0ba14c5..3ccd9c7c41 100644 --- a/examples/converting-from-user-defined-type-to-json/converting_from_user_defined_type_to_json.out +++ b/examples/convert-from-user-defined-type-to-json/convert_from_user_defined_type_to_json.out @@ -1,3 +1,3 @@ -$ bal run converting_from_user_defined_type_to_json.bal +$ bal run convert_from_user_defined_type_to_json.bal {"name":"Colombo","cords":[6.95,79.84]} {"name":"Colombo","cords":[6.94,79.83],"area":"03"} diff --git a/examples/index.json b/examples/index.json index 3acba6736b..b4cbc03a4c 100644 --- a/examples/index.json +++ b/examples/index.json @@ -991,14 +991,14 @@ }, { "name": "Convert from user-defined type to JSON", - "url": "converting-from-user-defined-type-to-json", + "url": "convert-from-user-defined-type-to-json", "verifyBuild": true, "verifyOutput": true, "isLearnByExample": true }, { "name": "Convert from table and XML to JSON", - "url": "converting-from-table-and-xml-to-json", + "url": "convert-from-table-and-xml-to-json", "verifyBuild": true, "verifyOutput": true, "isLearnByExample": true diff --git a/examples/json-numbers/json_numbers.md b/examples/json-numbers/json_numbers.md index f223100ccf..cd616eec38 100644 --- a/examples/json-numbers/json_numbers.md +++ b/examples/json-numbers/json_numbers.md @@ -10,5 +10,5 @@ Ballerina has three numeric types; but JSON has one. The `json` type allows `int ## Related links - [Casting JSON to user-defined type](/learn/by-example/casting-json-to-user-defined-type/) -- [Converting to user-defined type](/learn/by-example/converting-to-user-defined-type/) +- [Convert to user-defined type](/learn/by-example/convert-to-user-defined-type/) - [JSON type](/learn/by-example/json-type/) diff --git a/examples/json-type/json_type.md b/examples/json-type/json_type.md index cc7b323ca9..7c58d91182 100644 --- a/examples/json-type/json_type.md +++ b/examples/json-type/json_type.md @@ -11,6 +11,6 @@ The `json` type can be explained as a union of the simple basic types, `string`, ## Related links - [Access JSON elements](/learn/by-example/access-json-elements/) - [Convert from JSON to user-defined type](/learn/by-example/convert-from-json-to-user-defined-type/) -- [Convert from user-defined type to JSON](/learn/by-example/converting-from-user-defined-type-to-json/) +- [Convert from user-defined type to JSON](/learn/by-example/convert-from-user-defined-type-to-json/) - [fromJsonString](https://lib.ballerina.io/ballerina/lang.value/0.0.0#fromJsonString) - [cloneWithType](https://lib.ballerina.io/ballerina/lang.value/0.0.0#cloneWithType) \ No newline at end of file