2 years ago

#60721

test-img

Stefano

Java Serialize / Deserialize JSON

i have a problem during marshalling and serializing JSON to backend.

@Portable
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class PrenotazioneDTO implements Serializable
{
    private Date date;
    private List (OrdiniArticoloDTO) ordini;
    private ClienteDTO cliente;
    private RepartoDTO reparto;
    private Long numeroNeg;
    private String filiale;
    private String codiceTerminale;
    private Long idCauzione;
    private String eanIdPrenotazione;
    private String cedi;
    private String barcode;
    private Long ordineWeb;
    private Integer idTestata;
    private List<Integer> idTestataList;
    private String promozioni;
... getter and setter...
}
</code>

Sometimes the ClienteDTO is not serialized to JSON (result: null). This DTO is always different from null. OrdiniArticoloDTO, ClienteDTO and RepartoDTO doesn't have "implements Serializable". Should i add "implements Serializable" to all this three Objects or remove "implements Serializable" from class PrenotazioneDTO?

json

serialization

gwt

0 Answers

Your Answer

Accepted video resources