0.2.1b • Published 12 years ago

fjson v0.2.1b

Weekly downloads
20
License
-
Repository
github
Last release
12 years ago

FunkyJSON

FunkyJSON (FJSON) is an extension of the JSON that allows for the transmission of functions via JSON. The need to serialize functions into JSON was necessary to solve certains issues we were having so we developed a mean to serialize functions and parse them. FJSON is a very simple library.

How It Works

FJSON takes a function and converts into a serializable object. For example, assume the object:

var hello = function(name) {
  console.log(name);
}; 

Would be converted to the following serializable object:

{
  "FUNCTION": true,
  "params": [""],
  "body": "console.log(name);"
}   

How to Use It

Installation

Install via NPM easily with npm install fjson or globally with npm install -g fjson

Usage

Once installed require in your code file easily: var FJSON = require("fjson");

From here you can use the variable you stored the library into (in the above example it's FJSON) or you can use the same functions on the JSON object.

Use FJSON.funkify(obj); to serialize the object as a string (including functions) and use FJSON.unfunkify(str); to convert a FJSON string into an object.

FJSON should be usable in a browser but this is untested.

Author

Brandon Buck brandon.buck@logicnation.us

License

AGPL v3

This software is licensed under the Affero General Public License which can be found here.

0.2.1b

12 years ago

0.2.0b

12 years ago

0.1.7b

12 years ago

0.1.6b

12 years ago

0.1.5b

12 years ago

0.1.4b

12 years ago

0.1.3b

12 years ago

0.1.2b

12 years ago

0.1.1b

12 years ago

0.1.0b

12 years ago