-
Bug
-
Resolution: Done
-
Critical
-
6.0.1
-
None
Description of problem:
When I request for a task content (http://localhost:8080/business-central/rest/task/content/2), I will get something like:
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><content><id>2</id><class-name>java.util.HashMap</class-name><content-map><entry key="ActorId" class-name="java.lang.String">rO0ABXQABGliZWs=</entry><entry key="TaskName" class-name="java.lang.String">rO0ABXQACUhlbGxvVGFzaw==</entry><entry key="NodeName" class-name="java.lang.String">rO0ABXQABUhlbGxv</entry></content-map></content>
JSON:
{"id":2,"serializedContent":null,"contentMap":
{"ActorId":"ibek","TaskName":"HelloTask","NodeName":"Hello"},"content":"rO0ABXoAAAJcCgYIBRAEGABKuQQIABJIb3JnLmRyb29scy5jb3JlLm1hcnNoYWxsaW5nLmltcGwuU2VyaWFsaXphYmxlUGxhY2Vob2xkZXJSZXNvbHZlclN0cmF0ZWd5GuoDrO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAAEdwQAAAAEdAAEaWJla3QACUhlbGxvVGFza3QABUhlbGxvc3IAEWphdmEudXRpbC5IYXNoTWFwBQfawcMWYNEDAAJGAApsb2FkRmFjdG9ySQAJdGhyZXNob2xkeHA/QAAAAAAADHcIAAAAEAAAAAN0AAdBY3Rvcklkc3IAN2NvbS5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVkTWVzc2FnZUxpdGUkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsAB2FzQnl0ZXN0AAJbQkwAEG1lc3NhZ2VDbGFzc05hbWV0ABJMamF2YS9sYW5nL1N0cmluZzt4cHVyAAJbQqzzF/gGCFTgAgAAeHAAAAARCgdBY3RvcklkEAAaBAAAAAB0AC9vcmcuamJwbS5tYXJzaGFsbGluZy5pbXBsLkpCUE1NZXNzYWdlcyRWYXJpYWJsZXQACFRhc2tOYW1lc3EAfgAIdXEAfgAMAAAAEgoIVGFza05hbWUQABoEAAAAAXEAfgAOdAAITm9kZU5hbWVzcQB+AAh1cQB+AAwAAAASCghOb2RlTmFtZRAAGgQAAAACcQB+AA54eFIWCgx2YXJpYWJsZXNNYXAQABoEAAAAAw=="}
Notice that the values of entries contain humanly unreadable content. I believe that the values are always strings, aren't they? So, it might be enough to change the return type from Map<String, Object> to Map<String, String>. If it is not possible to change the type, then it could be done by marshalling the content as it must be of type of class known for JAXB context.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info: