Add Ballerina language (#3818)

* Add Ballerina language

* Add missing file

* Update color

* Update with required changes

* Update sub-module
This commit is contained in:
Shan Mahanama
2017-09-17 17:59:12 +05:30
committed by Colin Seymour
parent 78c58f956e
commit c2d558b71d
11 changed files with 328 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import ballerina.lang.system;
function main (string[] args) {
// JSON string value.
json j1 = "Apple";
system:println(j1);
// JSON number value.
json j2 = 5.36;
system:println(j2);
// JSON true value.
json j3 = true;
system:println(j3);
// JSON false value.
json j4 = false;
system:println(j4);
// JSON null value.
json j5 = null;
//JSON Objects.
json j6 = {name:"apple", color:"red", price:j2};
system:println(j6);
//JSON Arrays. They are arrays of any JSON value.
json j7 = [1, false, null, "foo",
{first:"John", last:"Pala"}];
system:println(j7);
}