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

Marshall Schor commented on UIMA-3969:
--------------------------------------

During refactoring, found some edge case uses with serializing lists and 
arrays.  One of these involves an ambiguity:  If a feature value is [ 123, 456 
] this could be an array of numbers, or an array of FsRefs.  The context 
section has a list per type, under the key @featureRefs which says what 
features ought to be considered as having FsRefs.  That disambiguates this 
case.  But it fails in this following case:  the feature is an collection of 
integers, e.g., a list or array in UIMA, but because of other constraints, is 
being serialized as a separate Feature Structure. In this case the serialized 
value would be something like 1234 (which is to be interpreted as a FsRef, not 
as an integer).  But the @featureRefs doesn't list this feature as having 
featureRef values.

To fix this, I'm thinking of augmenting the @featureRef with 
@featureRefsOnlyIfSingle which would be a list of features which normally would 
be expected to have [ xxx,  ] kinds of (not Feature Ref) values, but if they 
have just a single number, then that number should be considered to be a FsRef.

> Add JSON Serialization for CASs and UIMA Descriptors
> ----------------------------------------------------
>
>                 Key: UIMA-3969
>                 URL: https://issues.apache.org/jira/browse/UIMA-3969
>             Project: UIMA
>          Issue Type: New Feature
>          Components: Core Java Framework
>    Affects Versions: 2.6.0SDK
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.6.1SDK
>
>
> Recent trends toward moving things into the cloud motivated me to consider 
> what a JSON serialization of the CAS and descriptor metadata (more 
> particularly, type systems) might look like.
> I've put up a Wiki page with some of the thoughts so far in this exploration, 
> here:  
> https://cwiki.apache.org/confluence/display/UIMA/JSON+serialization+for+UIMA
> I'm also fooling around with a proof-of-concept implementation, based on our 
> current XMI serialization for the CAS, as well as our MetaDataObject_impl 
> serialization for UIMA descriptors, in order to work out the details.  There 
> are additional nits (like how to configure things) not yet worked out.
> Comments and discussion appreciated; I've put this up as a Jira to record 
> them together - but feel free to use email also for any comments you feel 
> might be better being more ephemeral.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to