Coder Social home page Coder Social logo

json-active's Introduction

Json as Programming language

[made on nodejs]

# REQUIRE NODEJS INSTALLED TO RUN

## Syntax

like normal standard json files

{
	"name" : [value]
}

{
	"name" : [
			"index_1": 10,
			"index_2": "text127"
			]
}

also can be used as pure json if writen right

Example 1

{
    "main": {},

    "my_custom_function_name": {
        "return": null
    }

}

On this example you can find :

  • main function empty
  • a custom function with return value null that isn't used on main function

function logic:

to call the function

"output" : "function"
"function" : "input"

input and output can be null as empty

function structure:

basic structure

"function_name" : {
	"return": [value]
}

advanced structure

"main": {
	"function_name" : 10
},
"function_name" : {
	"return" : "$input"
}

$input is a system variable that is equal at input value/variable that was call as parameter like common myfunction(myparameter) also it can be used as direct return value or applied some changes

advanced structure #2

"main": {
	"function_name" : [
	"0" : 10,
	"1" : 2,
	"two" : 222
	]
},

"function_name" : {
	"return" : "$input[two]"
}

$input can be used as list with a name index

##list of system variables:

$input <- only usable on custom function system , outside still null $input[name] <- also can be used as list based on a name index $rnd[] <- random variable

Example 2

{
    "main": {
		"null" : "my_custom_output_function"
		
	},

    "my_custom_output_function": {
		
		"sys.out": {
            "0": "Hello",
            "1": "World"
        },
		
        "return": null
    }

}

On this example you can find :

  • main function with a function as equal null that can extend the main function without save any value as result
  • custom function that contain same return as before example and a sys.out as system.output where as based on a priority system (0 first of 1) , it send on output values

Example 3

{
    "main": {
        "sys.var.set": [{
            "id": "my_var",
            "value": 10
        }]
    }
}

On this example you can find :

  • main function with sys.var.set as variable.set where you can create a list of variables that require a id to define a name and optional a value to initialize
{
    "main": {
        "sys.var.set": [{
            "id": "my_one_var",
            "value": 10
        },{
            "id": "my_two_var",
            "value": 222
        }]
    }
}

On this example you can find:

  • same example before but with two variables : my_one_var & my_two_var

list of default functions:

  • sys : [

    • out = output system
    • var : [
      • set = create and define variables
      • change = modify created variables ]

    ]

Example 4

{
    "main": {	
	 "var.set": [{
         "id": "my_var",
         "value": 10
        }]
		
		
	},
	"plusplus":{
		"return": "$input+2"
	}
	
}

json-active's People

Contributors

devdyna avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.