У меня есть этот метод, который возвращает JSON.
public Map<String,Object> findAllById(Integer id,Integer channelId){
Object[] electronicBill=null;
try{
electronicBill =(Object[])ElectronicBillRepository.findAllById(id);
electronicBill=(Object[]) electronicBill[0];
String clave = null;
Date fecha = null ;
BigInteger numIdentificacion ;
Integer tipoidentificacion ;
clave=(String) electronicBill[0];
fecha=(Date) electronicBill[1];
numIdentificacion= (BigInteger) electronicBill[2];
tipoidentificacion=(Integer) electronicBill[3];
proofXML.put("clave", clave);
proofXML.put("fecha", fecha);
proofXML.put("tipoIdentificacion", numIdentificacion);
proofXML.put("numeroIdentificacion", tipoidentificacion);
}catch(Exception e){
throw new RuntimeException();
}
return proofXML;
}
Предыдущий метод генерирует этот ответ
{
"clave": "50618101700040226022200100001010000405353010803003",
"fecha": 201601010000000600,
"tipoIdentificacion": 402260222,
"numeroIdentificacion": 2
}
Теперь мой запрос связан, с которым я хотел бы показатьвывод следующим образом
{
"clave": "50601011600310112345600100010100000000011999999999",
"fecha": "2016-01-01T00:00:00-0600",
"emisor": {
"tipoIdentificacion": "02",
"numeroIdentificacion": "402260222"
},
"comprobanteXml": " "
}
Любая помощь в связи с этим, заранее спасибо