java - JsonPath from a Field name -


i working on orchestration service. service platform call multiple downstream services , pass error returned them. problem error field returned downstream service according json schema of service. e.g. -

"details": [ { "field": "downstream_service.request.path.field_name" } ]

my component needs return error in

"details": [ { "field": "my_component/users/index/field_name" } ]

i have java pojo object my_component , need json path field name field_name.

how json path of field pojo or json object? looking existing libraries or frameworks.

user pojo

public class user extends hateoasentity implements resourcemodel {   /**  * credentials allowed user.  *   */ @jsonproperty("credentials") @valid private list<credential> credentials = new arraylist<credential>(); /**  * business information collected customer create business  * user.  *   */ @jsonproperty("business_details") @valid private businessdetails businessdetails;  } 

business details pojo

public class businessdetails {  /**  * contact details entered user.  *   */ @jsonproperty("phone_contacts") @valid private list<phone> phonecontacts = new arraylist<phone>(); /**  * addresses entered user  *   */ @jsonproperty("addresses") @valid private list<address> addresses = new arraylist<address>(); } 

address pojo

public class address {  /**  * reference identifier  *   */ @jsonproperty("id") private string id; /**  * type of address  *   */ @jsonproperty("type") private address.type type; /**  * line-1 of address  *   */ @jsonproperty("line1") private string line1; /**  * line-2 of address  *   */ @jsonproperty("line2") private string line2; } 

my downstream service tell me error in line_1. have mapped line_1 line1 of schema definition. how can return user/business_details/addresses/line1 ?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -