Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilya-bobyr/jss
JavaScript Serialization library
https://github.com/ilya-bobyr/jss
Last synced: 17 days ago
JSON representation
JavaScript Serialization library
- Host: GitHub
- URL: https://github.com/ilya-bobyr/jss
- Owner: ilya-bobyr
- Created: 2011-07-10T07:50:00.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-07-10T08:08:49.000Z (over 13 years ago)
- Last Synced: 2024-04-18T03:45:54.133Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaScript Serialization
A layer on top of JSON that stores type information allowing store and retrival
of user class instances.For example:
```javascript
function UserClass(i)
{
this._i = i;
}UserClass.prototype =
{
f: function()
{
return this._i + 5;
}
};var a = new UserClass(10);
print("a.f(): " + a.f()); // "a.f(): 15"
var text = JSS.stringify(a);
var b = JSS.parse(text);
print("b.f(): " + b.f()); // "b.f(): 15"
```There are still a lot that may be added, but the basics seems to be here :)
Tested on Firefox {4,5}.
On Firefox 4 you would want to set JSS._bug636079 to true.
I am running this under JavaScript-C, that is a stripped down XULRunner. Not
sure how to get the runtime version infromation =) Suggestions welcome.