Skip to content
/ jtool Public

This project implemented JSON template, JSON schema & JSON operator. With these tools, you can move data processing from codes to configuration files.

License

Notifications You must be signed in to change notification settings

dackon/jtool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This project implemented a set of tools to create, manipulate and validate JSONs. It was created when I was developing a project (closed source, inspired by Blueprints of UnrealEngine) which uses configuration files to define RESTful APIs. The project splited API handling to multiple stages (e.g., processing request stage, MySQL/MongoDB interact stage, Redis interact stage, 3rd-party API call stage, response stage, etc), all these stages share one JSON pool, and each stage can create the needed JSON as input from the JSON pool (by using template and operator), also, each stage can add its product JSON to the JSON pool for other stages to use.

Example

Given JSON 'foo':

{
    "a1": 1
}

Given JSON 'bar':

{
    "b1": "hello world"
}

Given JSON template:

{
    "f1": "*foo/a1",
    "f2": "*bar/b1"
}

After executing the template, we can get the following JSON:

{
    "f1": 1,
    "f2": "hello world"
}

Please read template doc for more details.

Playground

  1. template
  2. template & operator
  3. template with 2D array

About

This project implemented JSON template, JSON schema & JSON operator. With these tools, you can move data processing from codes to configuration files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages