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

enable relative URLs in most places #35

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

brad
Copy link
Contributor

@brad brad commented Dec 31, 2016

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:

  1. git clone --branch relative-urls [email protected]:brad/Jasonpedia.git
  2. cd Jasonpedia
  3. python -m http.server 8000 (or with Python 2: python -m SimpleHTTPServer 8000)
  4. Set the URL in strings.xml to http://x.x.x.x:8000/demo.json where x.x.x.x is an IP address on the local network for your computer that is also accessible to the mobile device
  5. Install the app.

It 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.

@gliechtenstein
Copy link
Contributor

Started a thread here: Jasonette/documentation#32

@maks maks mentioned this pull request Jul 28, 2017
panterozo added a commit to jasonelle-archive/jasonette-android that referenced this pull request Sep 23, 2019
…into master.

It also needs a modification into AndroidManifest to work properly
'configChanges="orientation|screenSize"' in application section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants