Q:

serialize object instance basic property jackson

I have a main object like this:
    public class MainObject{

        @Column(unique = false, updatable = true, insertable = true, nullable = true, length = 255, scale = 0, precision = 0)
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;

        @Column(unique = true, updatable = true, insertable = true, nullable = true, length = 255, scale = 0, precision = 0)
        @Basic
        private String name;

        @JsonIgnoreProperties({"address" ... } )
        @ManyToOne(optional = true, targetEntity = Company.class)
        private Child child;

    }

I would like to serialize this with only one property of the child object as "basic" type. As you can see my best solution to is to ignore all the other properties of of the child object. 
My goal is get something like this:
{
    "id" = 12,
    "name" =  "some name",
    "company" = 42
}

but with my best solution so far, witch you can see upper i get the following:
 {
        "id" = 12,
        "name" =  "some name",
        "company" = {
           "id" = 42
       }
    }

I know there is annotation witch i can use in child object but here come the tricky part, in some other part in my program i want to serialize the child normally. 
public class Child{

    @Column(unique = false, updatable = true, insertable = true, nullable = true, length = 255, scale = 0, precision = 0)
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(unique = true, updatable = true, insertable = true, nullable = true, length = 255, scale = 0, precision = 0)
    @Basic
    private String name;

    @Column(unique = true, updatable = true, insertable = true, nullable = true, length = 255, scale = 0, precision = 0)
    @Basic
    private String address;

    ...
}

Is there a simple, way with annotations to get what i want?

A:

Thank for help @gigadot, but i found a lazier way.
So i just simply ignored the child
@JsonIgnore
@ManyToOne(optional = true, targetEntity = Company.class)
private Child child;

And then i create a simple method with @JsonProperty("child")
   @JsonProperty("child")
    public Long getChildId(){
        return this.child.getId();
    }

