Clean up Jackson inheritance examples

This commit is contained in:
David Morley 2016-03-11 05:33:12 -06:00
parent 165ab9bf66
commit 62f9269903
122 changed files with 232 additions and 232 deletions

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -1,10 +1,10 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Date;
import org.baeldung.jackson.annotation.BeanWithCustomAnnotation.CustomAnnotation;
import com.baeldung.jackson.annotation.BeanWithCustomAnnotation.CustomAnnotation;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.annotation.JsonInclude;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonFilter;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JacksonInject;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonRawValue;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonIgnoreType;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation;
package com.baeldung.jackson.annotation;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonAppend;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.containsString;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import com.fasterxml.jackson.annotation.JsonTypeId;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.annotation.extra;
package com.baeldung.jackson.annotation.extra;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
public class Item {
public int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
public class ItemWithIgnore {
public int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import com.fasterxml.jackson.annotation.JsonManagedReference;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
public class ItemWithSerializer {
public int id;

View File

@ -1,6 +1,6 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import org.baeldung.jackson.jsonview.Views;
import com.baeldung.jackson.jsonview.Views;
import com.fasterxml.jackson.annotation.JsonView;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,9 +1,9 @@
package org.baeldung.jackson.bidirection;
package com.baeldung.jackson.bidirection;
import java.util.ArrayList;
import java.util.List;
import org.baeldung.jackson.jsonview.Views;
import com.baeldung.jackson.jsonview.Views;
import com.fasterxml.jackson.annotation.JsonView;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.io.IOException;
import java.text.ParseException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.io.IOException;
import java.text.SimpleDateFormat;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.io.IOException;
import java.time.LocalDateTime;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import org.joda.time.DateTime;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.time.LocalDateTime;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.date;
package com.baeldung.jackson.date;
import java.util.Date;

View File

@ -1,9 +1,9 @@
package org.baeldung.jackson.deserialization;
package com.baeldung.jackson.deserialization;
import java.io.IOException;
import org.baeldung.jackson.dtos.Item;
import org.baeldung.jackson.dtos.User;
import com.baeldung.jackson.dtos.User;
import com.baeldung.jackson.dtos.Item;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;

View File

@ -1,9 +1,9 @@
package org.baeldung.jackson.deserialization;
package com.baeldung.jackson.deserialization;
import java.io.IOException;
import org.baeldung.jackson.dtos.ItemWithSerializer;
import org.baeldung.jackson.dtos.User;
import com.baeldung.jackson.dtos.ItemWithSerializer;
import com.baeldung.jackson.dtos.User;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
public class Item {
public int id;

View File

@ -1,7 +1,7 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import org.baeldung.jackson.deserialization.ItemDeserializerOnClass;
import org.baeldung.jackson.serialization.ItemSerializerOnClass;
import com.baeldung.jackson.deserialization.ItemDeserializerOnClass;
import com.baeldung.jackson.serialization.ItemSerializerOnClass;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
public class MyDto {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
public class MyDtoNoAccessors {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import com.fasterxml.jackson.annotation.JsonFilter;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
import com.fasterxml.jackson.annotation.JsonIgnoreType;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos;
package com.baeldung.jackson.dtos;
public class User {
public int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.ignore;
package com.baeldung.jackson.dtos.ignore;
import com.fasterxml.jackson.annotation.JsonIgnore;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.ignore;
package com.baeldung.jackson.dtos.ignore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.ignore;
package com.baeldung.jackson.dtos.ignore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.ignore;
package com.baeldung.jackson.dtos.ignore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.ignore;
package com.baeldung.jackson.dtos.ignore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
public class MyDtoWithEnum {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
public class MyDtoWithEnumCustom {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
public enum TypeEnumSimple {
TYPE1(1, "Type A"), TYPE2(2, "Type 2");

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
import com.fasterxml.jackson.annotation.JsonValue;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dtos.withEnum;
package com.baeldung.jackson.dtos.withEnum;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dynamicIgnore;
package com.baeldung.jackson.dynamicIgnore;
public class Address implements Hidable {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dynamicIgnore;
package com.baeldung.jackson.dynamicIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dynamicIgnore;
package com.baeldung.jackson.dynamicIgnore;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.dynamicIgnore;
package com.baeldung.jackson.dynamicIgnore;
public class Person implements Hidable {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
public class User {
public int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
public class UserWithConflict {
public int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
public class UserWithPrivateFields {
int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
import com.fasterxml.jackson.annotation.JsonRootName;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
public class Zoo {
public Animal animal;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.exception;
package com.baeldung.jackson.exception;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.field;
package com.baeldung.jackson.field;
public class MyDto {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.field;
package com.baeldung.jackson.field;
public class MyDtoAccessLevel {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.field;
package com.baeldung.jackson.field;
public class MyDtoWithGetter {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.field;
package com.baeldung.jackson.field;
public class MyDtoWithSetter {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
public class IgnoranceMixinOrIntrospection {
public static abstract class Vehicle {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.containsString;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import com.fasterxml.jackson.annotation.JsonIgnore;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.inheritance;
package com.baeldung.jackson.inheritance;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.jsonview;
package com.baeldung.jackson.jsonview;
import com.fasterxml.jackson.annotation.JsonView;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.jsonview;
package com.baeldung.jackson.jsonview;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.jsonview;
package com.baeldung.jackson.jsonview;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.jsonview;
package com.baeldung.jackson.jsonview;
import com.fasterxml.jackson.annotation.JsonView;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.jsonview;
package com.baeldung.jackson.jsonview;
public class Views {
public static class Public {

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.node;
package com.baeldung.jackson.node;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.node;
package com.baeldung.jackson.node;
public class NodeBean {
private int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.node;
package com.baeldung.jackson.node;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
package org.baeldung.jackson.sandbox;
package com.baeldung.jackson.sandbox;
import java.io.File;
import java.io.IOException;

Some files were not shown because too many files have changed in this diff Show More