I've previously made use of the "serialize and diff" approach where I have 
a model that I think is correct and will use the Jackson ObjectMapper to 
write out the JSON generated by the model. I then do a diff between that 
and the expected model to see what's wrong.

I'll echo the suggestion from Daniel - have you tried serializing the 
individual pieces and then work your way back up?

Cheers!

On Wednesday, March 30, 2016 at 8:49:09 PM UTC-4, Albert kobina Arhin wrote:
>
> Dear All,
>
> I ma looking for the best way to design a representation that best fits 
> this json type:
>
> {
>   "Summary":  
>              {
>                "VendorId" : 8976,
>                "TransferIdx" : "NetTeller1.2",
>                "AccountName" : "Albert Kobina Arhin",
>                "AccountNumber" : "0101010101010",
>                "BranchRoutNumber" : "050101",
>                "TransferCount" : 2,
>                "TransferValue" :500.00,
>                "TransferToken" : " 
> de2cc392e9cc4b30e25d23c4844e7c1682e6e2b9536a7673ee1f5c1076617be5 ",
>                "DeviceId" : "788989565",
>                "DeviceIPAddress":"128.90.0.89"
>              },
>   "Detail": 
>              [
>                 {
>                    "VendorIdx" : 198,
>                    "TransferIdx" : 8976,
>                    "VendorSerialNumber" : "010101",
>                    "TransferNarration" : "Monthly Allowance July",
>                    "BeneficiaryBranchRoutNumber" : "010101",
>                     "BeneficiaryName" : "Kenneth FiiFi Arhin", 
>                    "BeneficiaryNumber" : "0000000000001",
>                    "TransferType" : "77",
>                    "TransferAmount" : 200.00
>                  },
>                 {
>                    "VendorIdx" : 1780,
>                    "TransferIdx" : 8976,
>                    "VendorSerialNumber" : "018101",
>                    "TransferNarration" : "Monthly Allowance July",
>                    "BeneficiaryBranchRoutNumber" : "020101",
>                    "BeneficiaryName" : "Martha Afua Arhin", 
>                    "BeneficiaryAccountNumber" : "0000000000002",
>                    "TransferType" : "72",
>                    "TransferAmount" : 300.00
>                  }
>              ]
> }
>
> I came up with the following :
>
> public class ACHOriginationApi
> {
>
> private OriginationSummaryApi summary; 
> private  List<OriginationDetailApi>  details;
> }
>
> where OriginationSummaryApi and OriginationDetailApi are simple pojos that 
> map to the json.
>
> But I am having challenges deserializing  the Json string to 
> ACHOriginationApi object with the message
>
> {
>     "code": 400,
>     "message": "Unable to process JSON"
> }
>
> Can any one help ? I am at my wit's end.
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to