You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2012/10/06 01:24:03 UTC

[jira] [Commented] (PIVOT-875) JSON should support using pivot.collections.Map directly

    [ https://issues.apache.org/jira/browse/PIVOT-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470782#comment-13470782 ] 

Roger Whitcomb commented on PIVOT-875:
--------------------------------------

Also had to fix the JSONSerializerTest because it was relying on the old (IMHO broken) behavior and checking the value of "count" from a serialized JSON map.  "ant test" now runs clean again.

[trunk]
Sending        core\test\org\apache\pivot\json\test\JSONSerializerTest.java
Transmitting file data .
Committed revision 1394858.

[branches/2.0.x]
Sending        .
Sending        core\test\org\apache\pivot\json\test\JSONSerializerTest.java
Transmitting file data .
Committed revision 1394859.
                
> JSON should support using pivot.collections.Map directly
> --------------------------------------------------------
>
>                 Key: PIVOT-875
>                 URL: https://issues.apache.org/jira/browse/PIVOT-875
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core-json
>    Affects Versions: 2.0.2
>         Environment: All
>            Reporter: Roger Whitcomb
>            Priority: Trivial
>              Labels: JSON
>             Fix For: 2.0.3
>
>
> When supplying a pivot.collections.Map as the data object for a TableView, the data is fetched for each row using JSON.get(...).  However, this method will default to using the BeanAdapter for anything other than a java.util.Map, which results in values like "class", "capacity", "count" and "comparator" fetching the values for the Map object instead of using the "get" method of the actual map to get the values.
> This fix will likely speed things up (a bit) because the first "if" in the chain will now succeed for Pivot Map-based objects, instead of having to fail and do three other tests before getting to the "dictionary.get" for these objects.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira