Custom Fields + Set Relation in Plugin erstellen

Gibt es hierzu ein How To? Wo muss die JSON liegen? Was ist noch notwendig?