Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the "index.json" file format occasionally change? #718

Closed
mflint opened this issue Jan 24, 2016 · 5 comments
Closed

Does the "index.json" file format occasionally change? #718

mflint opened this issue Jan 24, 2016 · 5 comments
Labels
architecture Organization of the pages per language, platform, etc.

Comments

@mflint
Copy link
Contributor

mflint commented Jan 24, 2016

Forgive me, I think I'm going mad.

I'm getting the index.json file from inside https://tldr-pages.github.io/assets/tldr.zip, and my app occasionally fails to parse the file.

Last week, I was converting the JSON to the Swift type Dictionary<String, Array<Dictionary<String, AnyObject>>>, which implied that the file format was something like this:

{"commands":[{"name":"7za","platform":["common"]}]}

But then it stopped working. I needed to change it to Array<Dictionary<String, AnyObject>> because it was getting this JSON inside the zip:

[{"name":"7za","platform":["common"]}]

And this morning (sometime around 9am UTC) it changed back.

Is this an expected thing? Seems strange to me.

(Confirmation: I've been testing the app on several iOS simulators, and each one has a separate directory for storing documents. Sure enough, the ones I tested last night have an array as the root object. This morning I'm seeing a dictionary/map as the top level object, with a "commands" key.)

@mflint
Copy link
Contributor Author

mflint commented Jan 24, 2016

(Edited to correct a typo - I'm downloading the tldr zip from https://tldr-pages.github.io/assets/tldr.zip)

@igorshubovych
Copy link
Collaborator

@mflint
It was fixed already. Sorry for inconvenience. See #717.

@rubenvereecken
Copy link
Contributor

I believe @igorshubovych just fixed this one. Might be worth having a test for.

@mflint
Copy link
Contributor Author

mflint commented Jan 24, 2016

@igorshubovych No apologies necessary!

So the correct format is {"commands":[{"name":"7za","platform":["common"]}]}.

@rubenvereecken
Copy link
Contributor

Yeap.

@waldyrious waldyrious added the architecture Organization of the pages per language, platform, etc. label Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Organization of the pages per language, platform, etc.
Projects
None yet
Development

No branches or pull requests

4 participants