OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 16-Oct-2006 08:21:56
Branch: HEAD Handle: 2006101607215600
Modified files:
openpkg-src/json json.patch json.spec
Log:
upgrading package: json 20060629 -> 20061016
Summary:
Revision Changes Path
1.2 +12 -17 openpkg-src/json/json.patch
1.14 +3 -3 openpkg-src/json/json.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/json/json.patch
============================================================================
$ cvs diff -u -r1.1 -r1.2 json.patch
--- openpkg-src/json/json.patch 29 Jun 2006 06:42:33 -0000 1.1
+++ openpkg-src/json/json.patch 16 Oct 2006 06:21:56 -0000 1.2
@@ -1,7 +1,7 @@
Index: json.js
---- json.js.orig 2006-06-29 08:25:57 +0200
-+++ json.js 2006-06-29 08:36:15 +0200
-@@ -4,22 +4,28 @@
+--- json.js.orig 2006-10-16 08:16:54 +0200
++++ json.js 2006-10-16 08:20:19 +0200
+@@ -4,16 +4,19 @@
This file adds these methods to JavaScript:
@@ -21,23 +21,21 @@
string.parseJSON()
This method parses a JSON text to produce an object or
- array. It will return false if there is an error.
+@@ -23,7 +26,8 @@
+ JavaScript Programming Language in the Fourth Edition of the
+ ECMAScript standard.
*/
-(function () {
-+
+var JSON = {};
-+
+JSON.encode = function (obj) {
var m = {
'\b': '\\b',
'\t': '\\t',
-@@ -99,22 +105,28 @@
+@@ -103,21 +107,22 @@
return '"' + x + '"';
}
};
-+ return s.object(obj);
-+};
-
+-
- Object.prototype.toJSONString = function () {
- return s.object(this);
- };
@@ -48,27 +46,24 @@
-})();
-
-String.prototype.parseJSON = function () {
++ return s.object(obj);
++};
+JSON.decode = function (str) {
try {
- return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
-- this.replace(/"(\\.|[^"\\])*"/g, ''))) &&
+- return (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u
\n\r\t])+?$/.test(this)) &&
- eval('(' + this + ')');
-+ str.replace(/"(\\.|[^"\\])*"/g, ''))) &&
++ return (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u
\n\r\t])+?$/.test(str)) &&
+ eval('(' + str + ')');
} catch (e) {
return false;
}
};
-+
+String.prototype.parseJSON = function () {
+ return JSON.decode(this);
+};
-+
+Object.prototype.toJSONString = function () {
+ return JSON.encode(this);
+};
-+
+Array.prototype.toJSONString = function () {
+ return JSON.encode(this);
+};
-+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/json/json.spec
============================================================================
$ cvs diff -u -r1.13 -r1.14 json.spec
--- openpkg-src/json/json.spec 13 Oct 2006 17:29:09 -0000 1.13
+++ openpkg-src/json/json.spec 16 Oct 2006 06:21:56 -0000 1.14
@@ -26,7 +26,7 @@
%define V_api_c 0.6
%define V_api_pl1 1.07
%define V_api_pl2 0.01
-%define V_api_js 20060510
+%define V_api_js 20061005
%define V_draft 01
# package information
@@ -39,8 +39,8 @@
Class: PLUS
Group: Language
License: Open Source
-Version: 20060629
-Release: 20061013
+Version: 20061016
+Release: 20061016
# list of sources
Source0: http://oss.metaparadigm.com/json-c/json-c-%{V_api_c}.tar.gz
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]