0
데이터베이스에서 데이터를 검색하고 일련 화하려고하면 프로그램이 제대로 작동하지 않는 것 같습니다. isPublic 을 ID 제목 내용 ... 내 프론트 엔드 웹 애플리케이션에 연결flexjson에서 JSONSerialize를 사용할 때 오류가 발생했습니다.
매번, 그것은 그들에게 메모를로드 직렬화하려고하고 전면에 나타 내기 : 나는 다음과 같은 속성을 가진 개체를 정의 종료.
그러나 메모 목록을 직렬화하려고하면 문제가 발생합니다. 내가이 함수를 아래에서 호출 할 때마다 아무 곳에서나 끝나기 때문에 제대로 실행되지 않습니다.
public static String manyToJSON(Iterable<Note> col) {
// if a collection is serialized do not include the 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);
}
명백한 이유가있을 수 있습니까? 어떤 도움을 주시면 감사하겠습니다.