jsonify-url-payload
Introduction
Mix jsonify payload to URL.
Parse jsonify payload from URL.
Install
Node:
npm i -D jsonify-url-payload
Browser:
Usage
Import in Node(es):
Import in Browser:
const mixer parser = jsonifyURL
Then
const myURL = // => 127.0.0.1?a=1&b=%222%22&c=%5B3%5D&d=%7B%22e%22%3A%22%E4%BD%A0%E5%A5%BD%22%7D const myPayload = // => { a: 1, b: '2', c: [3], d: { e: '你好' } }
See also test cases.