json - Error when use JSONSerialize in flexjson -


my program seems not working when try retrieve , serialize data database. define object has following attribute: id title content ispublic ...

everytime connect frontend webapp, try load notes, serialize them, , show them on front end.

but got problem when try serialize list of notes. everytime call function below, ends nowhere, , never execute right.

public static string manytojson(iterable<note> col) { // if collection serialized not include content string[] attrs = new string[]{     "id",     "title",     "owner.id",     "owner.firstname",     "owner.lastname",     "contacts.id",     "contacts.firstname",     "contacts.lastname",     "contacts.telnr",     "resources.id",     "resources.name",     "createdat",     "updatedat",     "ispublic",     "isshared" }; return new jsonserializer().include(attrs).exclude("*").serialize(col); } 

could obvious reason? appreciated.

since attributes apart of note being ignored since you're handing on iterable. you'll want append "values." onto each attribute tells flexjson attributes apart of note , not iterable.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -