Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Jape is an easy way to convert a JSON object to a string for use in URLs and APIs.
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
node_modules
test
.gitignore
README.md
index.js
package.json

README.md

Jape is a simple way to convert a JSON object to a single URI Encoded string. Such strings can be used in API requests when one wants to use a comfortable JSON object and get it converted to a URL friendly string. It changes ' ' (a space) to %20 and similar, and also supports multi-property objects by concatenating with &.

npm install jape

var jape = require('jape');
var jsonObject = {
    text: 'hello, tworld. welcome to 1.1.',
    screen_name: 'theseancook'
}
jape(jsonObject); //returns 'text=hello%2C%20tworld.%20welcome%20to%201.1.&screen_name=theseancook'
Something went wrong with that request. Please try again.