cradlepoint / jsonapiary Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Unfortunately under Windows I have the different line endings \r\n
instead of \n
. As long as the tests directly compare against Strings this causes issue.
Not sure what the cleanest approach is. Simplest would be to replace all \r\n
with \n
.
@JsonUnwrapped is a Jackson annotation that "flattens" the attributes of an inner variable and puts all key/values into the current level of the json body.
The @JsonUnwrapped payload is not taken into account by JsonApiary. I tested and debugged around. The ObjectMapper treats it correctly (even with Jsonapiary module loaded) if not wrapped in a JsonApiEnvelope. But as soon as an object gets wrapped in JsonApiEnvelop the unwrapping no longer happens.
Unfortunately this goes beyond my knowledge of Jackson. My gut feeling after debugging tells me that JsonApiary code calls a layer of Jackson where the unwrapping already should have happened and that the JsonApiaryModule calls the wrong method.
Hello,
when I clone the master branch and execute a maven test ; there are failled tests. Can you have a look?
Failing tests are:
loopConstructonTest
complexRelationshipSerializationTest
Thank you!!
Seems that only List is supported as of now but could be probably replaced with Collection instead:
Unfortunately I can't build and verify it under Windows (#13)
Hey, me again. I discovered some behavior I think it is worth to discuss.
We have the following use case:
think of an customer API endpoint to create customers. E.g.
POST api/customers
where a list of customers can be given in as body, e.g.:
{
"data": [
{
"type": "customer",
"attributes": {
"name": "Best Customer",
"age": 40,
"someother": "value"
}
},
{
"type": "customer",
"attributes": {
"name": "Best Customer2",
"age": 80,
"someother": "cool!"
}
}
]
}
Note: There is no ID in one of these objects because they need to be created.
Now the behavior is, that after JsonApiAiry with Jackson deserializes the JSON shown above to an Java List with 2 identical objects. The ID of both is, as expected, null, but the attributes are equal, and the attributes section of the second new customer gets ignored/forgotten.
Why is that so?
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.