You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Cliff Stanford (JIRA)" <ji...@apache.org> on 2010/02/09 19:23:28 UTC

[jira] Created: (COUCHDB-646) JSON object hidden from the sandbox for show and list

JSON object hidden from the sandbox for show and list
-----------------------------------------------------

                 Key: COUCHDB-646
                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
             Project: CouchDB
          Issue Type: Bug
          Components: Build System
    Affects Versions: 0.11
         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
            Reporter: Cliff Stanford


Three issues that I think are related so I have opened them as a single ticket.

TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.

The form object.toJSON() does not seem to be working in show and list.

var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-646) JSON object hidden from the sandbox for show and list

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835390#action_12835390 ] 

Paul Joseph Davis commented on COUCHDB-646:
-------------------------------------------

I don't see where we allowed the JSON object into the sandbox in 0.10, but even if we did it wouldn't solve the issue with JSON.stringify(new Date()). The new JSON.stringify relies on the Date prototype having a toJSON method that is defined in newer Spidermonkey's, but not in 1.7.

The proper patch to get toJSON(new Date()) working would be to do as Jchris said in an email somewhere about adding a toJSON function when one doesn't exist. Which sounds ok in theory but I'm wondering if anyone can predict any issues before I go down that path.

> JSON object hidden from the sandbox for show and list
> -----------------------------------------------------
>
>                 Key: COUCHDB-646
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
>            Reporter: Cliff Stanford
>
> Three issues that I think are related so I have opened them as a single ticket.
> TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.
> The form object.toJSON() does not seem to be working in show and list.
> var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-646) JSON object hidden from the sandbox for show and list

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-646:
--------------------------------------

    Skill Level: New Contributors Level (Easy)

> JSON object hidden from the sandbox for show and list
> -----------------------------------------------------
>
>                 Key: COUCHDB-646
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
>            Reporter: Cliff Stanford
>
> Three issues that I think are related so I have opened them as a single ticket.
> TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.
> The form object.toJSON() does not seem to be working in show and list.
> var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-646) JSON object hidden from the sandbox for show and list

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835745#action_12835745 ] 

Chris Anderson commented on COUCHDB-646:
----------------------------------------

I've committed a change in r911602 to explicitly add the JSON object to the sandbox. Maybe this will help...maybe not.

Cliff do you mind checking to see if JSON.stringify is more useful now?

> JSON object hidden from the sandbox for show and list
> -----------------------------------------------------
>
>                 Key: COUCHDB-646
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
>            Reporter: Cliff Stanford
>
> Three issues that I think are related so I have opened them as a single ticket.
> TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.
> The form object.toJSON() does not seem to be working in show and list.
> var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-646) JSON object hidden from the sandbox for show and list

Posted by "Cliff Stanford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836380#action_12836380 ] 

Cliff Stanford commented on COUCHDB-646:
----------------------------------------



Works fine now, thanks.

Regards,
Cliff.

-- 
Cliff Stanford
Might Limited                           +44 845 0045 666 (Office)
Suite 67, Dorset House                  +44 7973 616 666 (Mobile)
Duke Street, Chelmsford, CM1 1TB



> JSON object hidden from the sandbox for show and list
> -----------------------------------------------------
>
>                 Key: COUCHDB-646
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
>            Reporter: Cliff Stanford
>
> Three issues that I think are related so I have opened them as a single ticket.
> TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.
> The form object.toJSON() does not seem to be working in show and list.
> var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-646) JSON object hidden from the sandbox for show and list

Posted by "Cliff Stanford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835529#action_12835529 ] 

Cliff Stanford commented on COUCHDB-646:
----------------------------------------

json2.js has a Date.toJSON prototype.  But it won't overwrite an existing one.  The solution may be simply to let it walk over the inbuilt prototype which, presumably, doesn't work.

Just taking out line 173 (and the }, obviously) would probably do the trick.


> JSON object hidden from the sandbox for show and list
> -----------------------------------------------------
>
>                 Key: COUCHDB-646
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-646
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: CouchDB built from head.  Ubuntu. JavaScript-C 1.7.0 2007-10-03
>            Reporter: Cliff Stanford
>
> Three issues that I think are related so I have opened them as a single ticket.
> TheJSON object defined in main.js appears not to be available any more in show and list.  I believe it was in a previous release.
> The form object.toJSON() does not seem to be working in show and list.
> var d = new Date(); toJSON(d) returns {} rather than a string.  This also seems to be affecting views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.