◆ SerializerMessage() [1/2]
org.turro.jpa.serializer.SerializerMessage.SerializerMessage |
( |
Object |
entity | ) |
|
◆ SerializerMessage() [2/2]
org.turro.jpa.serializer.SerializerMessage.SerializerMessage |
( |
String |
data | ) |
|
◆ show()
void org.turro.jpa.serializer.SerializerMessage.show |
( |
Page |
page | ) |
|
Definition at line 52 of file SerializerMessage.java.
54 data = entity ==
null ? data :
new XMLSerializer(entity).serialize();
56 if(data.startsWith(
"<")) {
57 SAXBuilder builder =
new SAXBuilder();
58 Document doc = builder.build(
new StringReader(data.replaceAll(
"&(?![a-z]+;)",
"&")));
59 StringWriter sw =
new StringWriter();
60 Format fm = Format.getPrettyFormat();
61 XMLOutputter xo =
new XMLOutputter(fm);
64 Windows.title(
"XML Entity")
65 .addComponent(
new PreLabel(sw.toString()))
72 }
else if(data.startsWith(
"{")) {
73 Windows.title(
"JSON Entity")
74 .addComponent(
new PreLabel(JsonSearch.of(data).pretty()))
82 }
catch (Exception ex) {
83 Windows.title(
"String Entity")
84 .addComponent(
new PreLabel(data))
92 }
catch(Exception ex) {
93 WebLoggers.severe(
this).exception(ex).log();
The documentation for this class was generated from the following file: