[js-json] Initial commit

Jamie Nguyen jamielinux at fedoraproject.org
Mon Feb 24 16:15:16 UTC 2014


commit 20aebcdcdfc8c38be2c8c71abcaef508d96957e6
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Mon Feb 24 16:16:01 2014 +0000

    Initial commit

 .gitignore   |    1 +
 js-json.spec |   83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources      |    1 +
 3 files changed, 85 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ccfe103 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/js-json-20140204git3d7767b.tar.gz
diff --git a/js-json.spec b/js-json.spec
new file mode 100644
index 0000000..c1e1df0
--- /dev/null
+++ b/js-json.spec
@@ -0,0 +1,83 @@
+%global commitdate  20140204
+%global commit      3d7767b6b1f3da363c625ff54e63bbf20e9e83ac
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+%global installdir  %{_jsdir}/json
+
+Name:            js-json
+Version:         %{commitdate}git%{shortcommit}
+Release:         2%{?dist}
+Summary:         An implementation of JSON encoders/decoders in JavaScript
+
+Group:           System Environment/Libraries
+License:         Public Domain
+URL:             https://github.com/douglascrockford/JSON-js
+Source0:         https://github.com/douglascrockford/JSON-js/archive/%{commit}/%{name}-%{version}.tar.gz
+
+BuildArch:       noarch
+
+BuildRequires:   web-assets-devel
+Requires:        web-assets-filesystem
+
+%description
+JSON is a light-weight, language independent, data interchange format.
+See http://www.JSON.org/
+
+This software is an implementation of JSON encoders/decoders in Javascript.
+
+json2.js: This file creates a JSON property in the global object, if there
+isn't already one, setting its value to an object containing a stringify
+method and a parse method. The parse method uses the eval method to do the
+parsing, guarding it with several regular expressions to defend against
+accidental code execution hazards. On current browsers, this file does nothing,
+preferring the built-in JSON object.
+
+json.js: This file does everything that json2.js does. It also adds a
+toJSONString method and a parseJSON method to Object.prototype. Use of this
+file is not recommended.
+
+json_parse.js: This file contains an alternative JSON parse function that
+uses recursive descent instead of eval.
+
+json_parse_state.js: This files contains an alternative JSON parse function that
+uses a state machine instead of eval.
+
+cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,
+which make it possible to encode cyclical structures and dags in JSON, and to
+then recover them. JSONPath is used to represent the links.
+http://GOESSNER.net/articles/JsonPath/
+
+
+%prep
+%setup -q -n JSON-js-%{commit}
+
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{installdir}
+install -p -m0644 -D cycle.js \
+    %{buildroot}%{installdir}/cycle.js
+install -p -m0644 -D json.js \
+    %{buildroot}%{installdir}/json.js
+install -p -m0644 -D json2.js \
+    %{buildroot}%{installdir}/json2.js
+install -p -m0644 -D json_parse.js \
+    %{buildroot}%{installdir}/json_parse.js
+install -p -m0644 -D json_parse_state.js \
+    %{buildroot}%{installdir}/json_parse_state.js
+
+
+%files
+%doc README
+%{installdir}
+
+
+%changelog
+* Sun Feb 23 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 20140204git3d7767b-2
+- install to %%{_jsdir}/json instead of %%{_jsdir}/js-json
+
+* Sun Feb 23 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 20140204git3d7767b-1
+- initial package
+
diff --git a/sources b/sources
index e69de29..7732bb1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9736c0b195090cf38c91721e3f53f969  js-json-20140204git3d7767b.tar.gz


More information about the scm-commits mailing list