Php webtags: Difference between revisions

198 bytes added ,  18:43, 26 June 2020
m
Line 72: Line 72:


== Option 3: JavaScript Object Notation ==
== Option 3: JavaScript Object Notation ==
This is a lightweight data-interchange format (JSON) that is easy for humans to read and write, but critically it is easy for machines to parse and generate for transferring the variables in a portable way.
This is a lightweight data-interchange format (JSON) that is easy for humans to read and write, but critically it is easy for machines to parse and generate for transferring the variables in a portable way.


Line 80: Line 81:
*For the main temperature chart, the JSON file contains such time & value pairs for outside temperature, inside temperature, and derivatives (wind chill, apparent temperature, heat index, feels like).
*For the main temperature chart, the JSON file contains such time & value pairs for outside temperature, inside temperature, and derivatives (wind chill, apparent temperature, heat index, feels like).
*The interval between sub-arrays (time and value pairs) depends on the chart, for daily rain and daily temperature there is a sub array for each day; but for most there is a sub-array for every minute (assuming Cumulus is left running for long enough) for a full 24 hours.  
*The interval between sub-arrays (time and value pairs) depends on the chart, for daily rain and daily temperature there is a sub array for each day; but for most there is a sub-array for every minute (assuming Cumulus is left running for long enough) for a full 24 hours.  
For the admin interface, the Cumulus MX engine has to pass information to and from the admin interface, this is done using application programming interface (but each interface uses json format).


If you want to set up your own json files, you may follow the same approach but need to choose the interval between such sub-arrays that suits your use in your web pages.
If you want to set up your own json files, you may follow the same approach but need to choose the interval between such sub-arrays that suits your use in your web pages.
5,838

edits