[
https://issues.jboss.org/browse/TEIID-2666?page=com.atlassian.jira.plugin...
]
Steven Hawkins edited comment on TEIID-2666 at 5/15/14 1:58 PM:
----------------------------------------------------------------
Just wanted to add a comment; while I don't need CSV and can certainly use an ESB
layer to handle streaming JSON transformations, it would be really useful to extend or
change the JSON formatter without having to patch OData4j. Here's an example of what
we do:
* The JSON initially looks either like so:
{code}
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value1,
"COLUMN_B":value1
},
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value2,
"COLUMN_B":value2
}
]
}
}
{code}
* Or like so:
{code}
{
"d" : {
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value1,
"COLUMN_B":value1
}
}
}
{code}
* And we want either this (1st case):
{code}
{
"TableNames" : [
{
"COLUMN_A":value1,
"COLUMN_B":value1
},
{
"COLUMN_A":value2,
"COLUMN_B":value2
}
]
}
{code}
* Or this (2nd case):
{code}
{
"TableName" : {
"COLUMN_A":value1,
"COLUMN_B":value1
}
}
{code}
It's really computationally intensive and expensive to have to reformat the JSON
responses coming out of Teiid.
Thanks,
John Muller
was (Author: blue666man):
Just wanted to add a comment; while I don't need CSV and can certainly use an ESB
layer to handle streaming JSON transformations, it would be really useful to extend or
change the JSON formatter without having to patch OData4j. Here's an example of what
we do:
# The JSON initially looks either like so:
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value1,
"COLUMN_B":value1
},
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value2,
"COLUMN_B":value2
}
]
}
}
# Or like so:
{
"d" : {
{
"__metadata" : {
"uri" : "http://somelongURL/odata/etc",
"type" : "SchemaName.TableName"
},
"COLUMN_A":value1,
"COLUMN_B":value1
}
}
}
# And we want either this (1st case):
{
"TableNames" : [
{
"COLUMN_A":value1,
"COLUMN_B":value1
},
{
"COLUMN_A":value2,
"COLUMN_B":value2
}
]
}
# Or this (2nd case):
{
"TableName" : {
"COLUMN_A":value1,
"COLUMN_B":value1
}
}
It's really computationally intensive and expensive to have to reformat the JSON
responses coming out of Teiid.
Thanks,
John Muller
Extend OData output formats, currently JSON and XML supported
-------------------------------------------------------------
Key: TEIID-2666
URL:
https://issues.jboss.org/browse/TEIID-2666
Project: Teiid
Issue Type: Feature Request
Components: Server
Affects Versions: 8.4
Environment: N/A
Reporter: Cojan van Ballegooijen
Priority: Trivial
We would like to see the available output formats of the OData services be extended with
CSV (Command Seperated Values) upon customer request.
It would be great if we could extend it ourselves using for example XSLT or other
transformation mechanism.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)