jam01 / xtrasonnet Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I get the following error with an InputStreamCache whose contents are JSON.
The input MediaType application/json is not supported for class org.apache.camel.converter.stream.InputStreamCache
InputStreamCache is just a sublcass of InputStream.
Workaround is to convert the message body to a String
.convertBodyTo(String.class)
Hi,
How can I provide a custom JsonMapper instance to camel-xtrasonnet?
hi
we were looking to add a few functions to xtrasonnet xtr. namespace...but wanted to do it through java. is that possible ?
Is it possible to write CSV? The closest I've gotten is outputting CSV string wrapped in an object.
Using 0.4.2 in Camel, getting:
java.lang.NoClassDefFoundError: scala/collection/IterableOnce
There are a couple of CVEs currently:
https://devhub.checkmarx.com/cve-details/CVE-2024-26308/
https://devhub.checkmarx.com/cve-details/CVE-2024-25710/
Can we bump the commons-compress to the latest version (1.26.1)?
Hi, I'm hoping you can help me understand what I'm doing wrong here:
var transform = """
{
name_title: payload.Salutation,
name_first: payload.FirstName,
name_last: payload.LastName,
primary_email: payload.Email
}
""";
final Transformer transformer = Transformer.builder(transform)
.configurePlugins(plugins -> {
plugins.removeIf(plugin -> plugin instanceof DefaultJavaPlugin);
plugins.add(0, new DefaultJavaPlugin(jsonMapper));
})
.build();
// contact is a POJO
final String result = transformer.transform(Document.of(contact, MediaTypes.APPLICATION_JAVA)).getContent();
Caused by: java.lang.IllegalArgumentException: The output MediaType application/json is not supported for class java.lang.String
at io.github.jam01.xtrasonnet.DataFormatService.lambda$mandatoryWrite$0(DataFormatService.java:62)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at io.github.jam01.xtrasonnet.DataFormatService.mandatoryWrite(DataFormatService.java:62)
at io.github.jam01.xtrasonnet.Transformer.$anonfun$transform$2(Transformer.scala:244)
at io.github.jam01.xtrasonnet.Transformer$.io$github$jam01$xtrasonnet$Transformer$$handleException(Transformer.scala:36)
at io.github.jam01.xtrasonnet.Transformer.transform(Transformer.scala:244)
at io.github.jam01.xtrasonnet.Transformer.transform(Transformer.scala:210)
I've also tried with this, but it doesn't seem to help:
final String result = transformer.transform(
Document.of(contact, MediaTypes.APPLICATION_JAVA),
new HashMap<>(),
MediaTypes.APPLICATION_JSON).getContent();
Thanks!
I'm having a little trouble determining what syntax to use for transforming CSV files of undetermined length. I'm trying this:
{
firstName: payload.FIRST_NAME
}
But I get the error:
sjsonnet.Error: attempted to index a array with string FIRST_NAME
It looks like xtrasonnet is loading all rows into memory and then expecting the transformation to specify a row index. What I'd like to do is stream through the input CSV file and have it apply the above transformation to each row. Is this possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.