Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [Moxy] json marshalling, mixed element unexpected behaviour
[Moxy] json marshalling, mixed element unexpected behaviour [message #1704072] Fri, 07 August 2015 07:50
Paweł Englert is currently offline Paweł EnglertFriend
Messages: 8
Registered: November 2014
Junior Member
Hi there,

Moxy generated wrong output when there is XML mixed element type and one of the nested elements is a string type.

Then in generated json, text is put into nested element instead of "value" element.


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" >
    <xs:element name="root" type="rootType"/>
    <xs:complexType name="rootType">
            <xs:element type="elementType" name="element" maxOccurs="unbounded" minOccurs="0"/>
    <xs:complexType name="elementType" mixed="true">
            <xs:element type="xs:string" name="nested" minOccurs="0"/>

sample xml:
    <element>should be into value element, not in nested<nested>nested content</nested></element>

Gives unexpected json output:

{"root":{"element":[{"nested":["should be into value element, not in nested","nested content"]}]}}

[Updated on: Fri, 07 August 2015 08:12]

Report message to a moderator

Previous Topic:Entities OneToMany Composite Primary keys
Next Topic:[Moxy] setValidating is throwing an exception when used on DynamicContext
Goto Forum:

Current Time: Sun Apr 21 01:59:25 GMT 2024

Powered by FUDForum. Page generated in 0.02963 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top