Hello, I am trying to use the JSON plugin in my struts2 application. I am
getting a parser error on the string returned from the server. I think the
plugin is having problems converting my Map to JSON.
Here is my object that I am trying to convert to JSON:
public class RoleDetails extends RoleImpl {
private List<Role> directParents;
private Map<Role, Set<Identity>> transitiveParentsWithSources;
private List<Role> directChildren;
private Map<Role, Set<Identity>> transitiveChildrenWithSources;
private List<Group> directGroupChildren;
private Map<Group, Set<Identity>> transitiveGroupChildrenWithSources;
private List<String> directUsernames;
private Map<String, Set<Identity>> transitiveUsernamesWithSources;
private List<Permission> directPermissionParents;
private Map<Permission, Set<Identity>>
transitivePermissionParentsWithSources;
I have attached the output from one of my requests, but it is pretty long, here
is the portion where the json compiler explodes:
<<json.txt>>
"transitiveChildrenWithSources":{},"transitiveGroupChildrenWithSources":ERROR
HERE{{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}:[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}]}
So it looks like there is either a problem with my map keyed by object, or the
transitiveChildrenWithSources map being empty. Any thoughts?
Brian Relph | Software Engineer | Cerner Corporation | 816-201-7642 | [EMAIL
PROTECTED] | www.cerner.com
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from
Cerner Corporation and are intended only for the addressee. The information
contained in this message is confidential and may constitute inside or
non-public information under international, federal, or state securities laws.
Unauthorized forwarding, printing, copying, distribution, or use of such
information is strictly prohibited and may be unlawful. If you are not the
addressee, please promptly delete this message and notify the sender of the
delivery error by e-mail or you may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.
{"name":"Role_HHM_Advisor","role":{"description":"Health Management
Advisor","directChildren":[],"directGroupChildren":[{"description":"Healthe
Consumers","groupNames":[],"name":"HealthCoaches","usernames":["test_usertool","healthcoach","test_usertool6","test_usertool11"]},{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"directParents":[],"directPermissionParents":[{"description":null,"name":"Permission_HHM_AddGoal","namespace":"HHM","roleNames":["role_hhm_advisor"]}],"directUsernames":[],"groupNames":["healthcoaches","hhm_advisor"],"name":"Role_HHM_Advisor","namespace":"HHM","roleNames":[],"transitiveChildrenWithSources":{},"transitiveGroupChildrenWithSources":{{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}:[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}]},"transitiveParentsWithSources":{},"transitivePermissionParentsWithSources":{},"transitiveUsernamesWithSources":{"admin_usertool":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"ar016581":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"bgraves":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"bk016677":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"bo017459":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"fk3794":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"healthcoach":[{"description":"Healthe
Consumers","groupNames":[],"name":"HealthCoaches","usernames":["test_usertool","healthcoach","test_usertool6","test_usertool11"]}],"hmadvisor1":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvisor1_cert":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvisor2":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvisor2_cert":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvisor3":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvisor3_cert":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvsr1":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvsr2":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"hmadvsr3":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}],"kchintan":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"kp014672":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"kp016678":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]},{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"newtestuser":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"relphie":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"rw012795":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"samkarl":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"temp_wasadmin":[{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"test_usertool":[{"description":"Healthe
Consumers","groupNames":[],"name":"HealthCoaches","usernames":["test_usertool","healthcoach","test_usertool6","test_usertool11"]},{"description":"super
users","groupNames":[],"name":"hin_wasadmins","usernames":["ar016581","temp_wasadmin","admin_usertool","relphie","bgraves","newtestuser","fk3794","samkarl","test_usertool","kp016678","bo017459","bk016677","rw012795","kchintan","kp014672"]}],"test_usertool11":[{"description":"Healthe
Consumers","groupNames":[],"name":"HealthCoaches","usernames":["test_usertool","healthcoach","test_usertool6","test_usertool11"]}],"test_usertool6":[{"description":"Healthe
Consumers","groupNames":[],"name":"HealthCoaches","usernames":["test_usertool","healthcoach","test_usertool6","test_usertool11"]}],"testuser13":[{"description":"Health
Management
Advisor","groupNames":["hin_wasadmins"],"name":"HHM_Advisor","usernames":["testuser13","kp016678","hmadvisor1","hmadvisor2_cert","hmadvisor1_cert","hmadvisor2","hmadvisor3","hmadvsr2","hmadvisor3_cert","hmadvsr1","hmadvsr3"]}]},"usernames":[]}}---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]