blob: f6e73be89137378cbe6640adb697ff8d44232c9d [file] [log] [blame]
% use JSON::XS;
% use Mojo::JSON;
% if (search->query_jsonld && kalamar_test_port()) {
% my $action;
% if (param('action') && param('action') eq 'inspect') {
% $action = ' active" style="cursor: default';
% };
% state $json = JSON::XS->new->allow_blessed->pretty->canonical(1);
<pre class="query serial<%== $action // '' %>" <% unless ($action) { %>onclick="this.classList.toggle('active')"<% } %>>
<span>JSON-LD Serialization for &quot;<%= param 'q' %>&quot;<% if (param('ql')) { %> (<%= param 'ql' %>)<% } %></span>
<code>
%# Workaround to keep true, false, and null intact
%= $json->encode($json->decode(Mojo::JSON::encode_json(search->query_jsonld)))
</code>
</pre>
%= javascript begin
hljs.initHighlightingOnLoad();
% end
% };