File | Date | Author | Commit |
---|---|---|---|
.gitignore | 2015-12-06 |
![]() |
[26c2e9] Add Data to gitignore |
LICENSE.md | 2015-04-11 |
![]() |
[d3beab] Add License and Readme information |
README.md | 2015-12-10 |
![]() |
[618548] Update readme |
alcdef.c | 2015-12-10 |
![]() |
[bf7800] Polish the code and comments |
alcdef.h | 2015-12-10 |
![]() |
[bf7800] Polish the code and comments |
alcdef_to_json.c | 2015-12-10 |
![]() |
[bf7800] Polish the code and comments |
alcdef_to_json.h | 2015-12-10 |
![]() |
[bf7800] Polish the code and comments |
main.c | 2015-12-10 |
![]() |
[bf7800] Polish the code and comments |
The ALCDEF 2.0 to JSON Converter is a tool for conversion astronomic data in
ALCDEF 2.0 format to more popular and generic JSON data interchange format.
The main conversion points are as follows:
- All JSON keys are in lower case
- Boolean strings from ALCDEF are represented as booleans in JSON
- String values from ALCDEF are escaped in JSON; commas are replaced with dots
- Doubles including the Julian Date are represented as doubles
- In the flat mode, data entries are suffixed with their index numbers
- In the nested mode, data entries are put into arrays, each element of such
arrays being an object with subfields of data represented as key-value pairs
The program currently accepts the following flags:
* --fromFile (upcoming) or --fromDir - required, with a single argument;
the argument defines the address of the input ALCDEF file or directory with
such files, respectively
* --toFile or --toDir (upcoming) - required, with a single argument;
the argument defines the address of the output JSON file or directory for
such files in case of dir-to-dir conversion; the output file(s) is/are
created automatically if not exist
* --flat - optional, with no arguments; defines the flat operation mode
(flat or nested); default choice is nested
alcdef2json --fromDir C://alcdef/ --toFile C://json/alcdefs.json --flat