[infinispan-issues] [JBoss JIRA] (ISPN-10796) XSite XML configuration not translated to correct JSON
Galder Zamarreño (Jira)
issues at jboss.org
Mon Oct 21 06:32:00 EDT 2019
Galder Zamarreño created ISPN-10796:
---------------------------------------
Summary: XSite XML configuration not translated to correct JSON
Key: ISPN-10796
URL: https://issues.jboss.org/browse/ISPN-10796
Project: Infinispan
Issue Type: Feature Request
Components: Configuration
Affects Versions: 10.0.0.CR3
Reporter: Galder Zamarreño
Assignee: Gustavo Fernandes
An XML cache configuration like this:
{code}
<infinispan>
<cache-container>
<distributed-cache name="example" mode="SYNC">
<backups>
<backup site="SiteA" strategy="ASYNC" timeout="30000"/>
</backups>
</distributed-cache>
</cache-container>
</infinispan>
{code}
Can be created with curl with:
{code}
curl -v -u ... -d '<infinispan><cache-container><distributed-cache name="example" mode="SYNC"><backups><backup site="SiteA" strategy="ASYNC" timeout="30000"/></backups></distributed-cache></cache-container></infinispan>' -H "Content-Type: application/xml" -X POST .../rest/v2/caches/example2
{code}
Retrieving it as JSON returns:
{code}
@g ~ $ curl -u ... -H "Content-Type: application/json" .../rest/v2/caches/example2?action=config | jq
{
"distributed-cache": {
"mode": "SYNC",
"backups": {
"backup": {
"site": "SiteA",
"strategy": "ASYNC",
"timeout": 30000
}
},
"transaction": {
"mode": "NONE"
}
}
}
{code}
That JSON is correct. Backups should be an array.
An FAQ should be added so that users know how to transform XML configuration to JSON. JSON is way less verbose, so might be preferable for curl commands.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list