Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML to JSON conversion - convert attributes #240

Open
greenlaw110 opened this issue Dec 21, 2020 · 0 comments
Open

XML to JSON conversion - convert attributes #240

greenlaw110 opened this issue Dec 21, 2020 · 0 comments
Assignees

Comments

@greenlaw110
Copy link
Collaborator

Given XML file as

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ehcache.xsd"
         updateCheck="true"
         monitoring="autodetect"
         dynamicConfig="true">

    <cache name="charityCache"
           maxEntriesLocalHeap="1000"
           eternal="false"
           timeToIdleSeconds="2" timeToLiveSeconds="20"
           memoryStoreEvictionPolicy="LFU"
           transactionalMode="off">
        <persistence strategy="none" />
    </cache>
    <cache name="charityTagsCache"
           maxEntriesLocalHeap="1000"
           eternal="false"
           timeToIdleSeconds="20" timeToLiveSeconds="60"
           memoryStoreEvictionPolicy="LFU"
           transactionalMode="off">
        <persistence strategy="none" />
    </cache>
</ehcache>

At the moment it misses attribute info when converted into JSON via:

$.convert(dom).to(JSONObject.class);

This CR is to add support to XML attributes into target JSON object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant