[Answer]-Why polymer not render html markup fetched from server in json format?

1👍

Polymer escapes any HTML when data-binding for security reasons.
You would have to manually set the contents when the response comes in. Something like:

<core ajax ... on-core-response="{{handleResponse}}"></core-ajax>
<div id="content"></div>

...

Polymer({
   ...
   handleResponse: function (e) {
     this.injectBoundHTML(e.detail.response[0].content, this.$.content);
   }
});

See official docs for more information about this.

Leave a comment