You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Ian Boston (JIRA)" <ji...@apache.org> on 2008/06/29 16:25:45 UTC

[jira] Created: (SHINDIG-412) JSON validator to loading features and validating JSON messages against the JSON API

JSON validator to loading features and validating JSON messages against the JSON API
------------------------------------------------------------------------------------

                 Key: SHINDIG-412
                 URL: https://issues.apache.org/jira/browse/SHINDIG-412
             Project: Shindig
          Issue Type: Improvement
          Components: RESTful API (Java)
            Reporter: Ian Boston


This patch adds the ability to load a feature.xml into a Javascript context and scope within the JVM, and then use that loaded Javascript context to inspect the JSON tree and evaluate parts of the feature. The aim being to be able to write generic Unit tests that can use the Javascript JSON API's to act as an 'in unit test' javascript context that will read the json messages as if they were inside the browser.

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


Re: [jira] Commented: (SHINDIG-412) JSON validator to loading features and validating JSON messages against the JSON API

Posted by Ian Boston <ie...@tfd.co.uk>.
Hey, thanks ... it was fun :),

Yes, no problem, it doesn't bind to social, only rhino in a test  
scope. I am still working on it to validate the json-lib  
serialization. Once I have managed to gone through all the  objects  
in the rest api, I will move into common and update the patch.

Ian

On 29 Jun 2008, at 21:49, Kevin Brown (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/SHINDIG-412? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment- 
> tabpanel&focusedCommentId=12609139#action_12609139 ]
>
> Kevin Brown commented on SHINDIG-412:
> -------------------------------------
>
> Ok, first off -- awesome work.
>
> We should try to get this into common rather than social-api,  
> though, because it's also something that I'd like to use for gadget  
> rendering (specifically, for makeRequest's OAuth flow).
>
> It doesn't look like it's really tied that closely to the social- 
> api artifact. Can we hoist it up?
>
>> JSON validator to loading features and validating JSON messages  
>> against the JSON API
>> --------------------------------------------------------------------- 
>> ---------------
>>
>>                 Key: SHINDIG-412
>>                 URL: https://issues.apache.org/jira/browse/ 
>> SHINDIG-412
>>             Project: Shindig
>>          Issue Type: Improvement
>>          Components: RESTful API (Java)
>>            Reporter: Ian Boston
>>         Attachments: SHINDIG-412.patch
>>
>>
>> This patch adds the ability to load a feature.xml into a  
>> Javascript context and scope within the JVM, and then use that  
>> loaded Javascript context to inspect the JSON tree and evaluate  
>> parts of the feature. The aim being to be able to write generic  
>> Unit tests that can use the Javascript JSON API's to act as an 'in  
>> unit test' javascript context that will read the json messages as  
>> if they were inside the browser.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>


[jira] Commented: (SHINDIG-412) JSON validator to loading features and validating JSON messages against the JSON API

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609139#action_12609139 ] 

Kevin Brown commented on SHINDIG-412:
-------------------------------------

Ok, first off -- awesome work.

We should try to get this into common rather than social-api, though, because it's also something that I'd like to use for gadget rendering (specifically, for makeRequest's OAuth flow).

It doesn't look like it's really tied that closely to the social-api artifact. Can we hoist it up?

> JSON validator to loading features and validating JSON messages against the JSON API
> ------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-412
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-412
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Ian Boston
>         Attachments: SHINDIG-412.patch
>
>
> This patch adds the ability to load a feature.xml into a Javascript context and scope within the JVM, and then use that loaded Javascript context to inspect the JSON tree and evaluate parts of the feature. The aim being to be able to write generic Unit tests that can use the Javascript JSON API's to act as an 'in unit test' javascript context that will read the json messages as if they were inside the browser.

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


[jira] Updated: (SHINDIG-412) JSON validator to loading features and validating JSON messages against the JSON API

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston updated SHINDIG-412:
-------------------------------

    Attachment: SHINDIG-412.patch

This is a first pass at the set of validator classes, I will be testing this further against real message to see if it provides a real mechanism to validate the JSON.

> JSON validator to loading features and validating JSON messages against the JSON API
> ------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-412
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-412
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: Ian Boston
>         Attachments: SHINDIG-412.patch
>
>
> This patch adds the ability to load a feature.xml into a Javascript context and scope within the JVM, and then use that loaded Javascript context to inspect the JSON tree and evaluate parts of the feature. The aim being to be able to write generic Unit tests that can use the Javascript JSON API's to act as an 'in unit test' javascript context that will read the json messages as if they were inside the browser.

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