Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I thought being able to use relative JSON urls would make it easier to share jasonette applications. For one example, I modified the jasonpedia demo app to use all relative URLs. To try:
git clone --branch relative-urls [email protected]:brad/Jasonpedia.git
cd Jasonpedia
python -m http.server 8000
(or with Python 2:python -m SimpleHTTPServer 8000
)strings.xml
tohttp://x.x.x.x:8000/demo.json
wherex.x.x.x
is an IP address on the local network for your computer that is also accessible to the mobile deviceIt should be completely functional (except for the missing Android features) and you can edit the json files locally and see the changes. The URLs are relative to the domain of the URL in
strings.xml
. You can just use the filename (other_json.json
) to refer to a file at the same level as the current json, or./
can also refer to files at the same level. You can also use../
to refer to files one level up, or start the path with/
to refer to the root of the domain.