Skip to main content

JSON-Calculation Scheme

This concept is used in a number of calculation formats in the Fortune-Teller API.

Generally speaking, a JSON-File, that is committed in the GIT project contains a calculation structure, that is to be applied on a base value. The structure provided in the JSON-File provides the raw-data for the calculation scheme, so that it is highly adjustable, without impacting the APIs code.


 

Each calculation scheme ends with a Disclaimer


Example for a file (not making sense)

{
  "country":"Deutschland",
  "comment1": "Order versions from recent to old, followed by Disclaimer",
  "income":
  	{	
		"2021": [
					...
				],
		"2020": [
					{
						"type":"absolute",
						"from":"0",
						"to":"1200",
                        "part":"1",
						"id":"gez",
						"base":"value",
						"tax":"120"
					},
					{
						"type":"percent",
						"from":"0",
						"to":"1200",
						"id":"est",
						"base":"base",
						"tax":"12%"
					},
					{
						"type":"percent",
						"from":"0",
						"to":"9999999999",
						"id":"soli",
						"base":"est",
						"tax":"5%"
					},
					{
						"rate":"100%"
					}
				],
		"Disclaimer":"Dieser Text erklärt Besonderheiten"
		}
    }
 }