<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,8 @@
 
 == ruote-rest - 0.9.19    not yet released
 
+- todo #21419  : removed direct dependency on json gem, relying on whatever is 
+                 present (activesupport or json)
 - bug   #21096 : reordered participant load order in conf/participants.rb
 - todo  #20647 : showing scheduled jobs for /processes
 </diff>
      <filename>CHANGELOG.txt</filename>
    </modified>
    <modified>
      <diff>@@ -95,7 +95,7 @@ end
 #
 unless {}.respond_to?(:to_json)
 
-  require 'json/pure'
+  require 'json'
 end
 
 #</diff>
      <filename>lib/misc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,7 +81,7 @@ class StProcessesTest &lt; Test::Unit::TestCase
 
     get_it &quot;/processes/#{fei.wfid}/representation&quot;
 
-    js = JSON.parse(@response.body)
+    js = json_parse(@response.body)
     assert_kind_of Array, js
     assert_equal &quot;application/json&quot;, @response[&quot;Content-Type&quot;]
 </diff>
      <filename>test/st_processes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ require 'rubygems'
 
 require 'optparse'
 
-require 'json/pure'
+require 'json' # gem 'json' or 'json_pure'
 
 require 'openwfe/workitem'
 require 'openwfe/util/xml'</diff>
      <filename>tools/launch.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,12 +52,12 @@
     &lt;% if @expression.raw_representation %&gt;
       &lt;br/&gt;
       raw representation :
-      &lt;div class=&quot;expression_raw_representation&quot;&gt;&lt;%= JSON.dump(@expression.raw_representation) %&gt;&lt;/div&gt;
+      &lt;div class=&quot;expression_raw_representation&quot;&gt;&lt;%= @expression.raw_representation.to_json %&gt;&lt;/div&gt;
     &lt;% end %&gt;
 
     &lt;% if @expression.raw_rep_updated %&gt;
       raw representation (updated) :
-      &lt;div class=&quot;expression_raw_rep_updated&quot;&gt;&lt;%= JSON.dump(@expression.raw_rep_updated) %&gt;&lt;/div&gt;
+      &lt;div class=&quot;expression_raw_rep_updated&quot;&gt;&lt;%= @expression.raw_rep_updated.to_json %&gt;&lt;/div&gt;
     &lt;% end %&gt;
 
     &lt;br/&gt;</diff>
      <filename>views/expression.erb</filename>
    </modified>
    <modified>
      <diff>@@ -9,9 +9,12 @@
     &lt;a href=&quot;/errors&quot;&gt;GET /errors&lt;/a&gt; | 
     &lt;a href=&quot;/participants&quot;&gt;GET /participants&lt;/a&gt;
   &lt;/div&gt;
+
+  &lt;% t = request.path_info.split('/')[1] %&gt;
+
   &lt;div class=&quot;h_right&quot; style=&quot;float: right;&quot;&gt;
     &lt;a href=&quot;&lt;%= as_x_href('xml') %&gt;&quot;&gt;as xml&lt;/a&gt; |
-    &lt;% if respond_to?(&quot;render_#{request.path_info.split('/')[1]}_json&quot;) %&gt;
+    &lt;% if respond_to?(&quot;render_#{t}_json&quot;) %&gt;
       &lt;a href=&quot;&lt;%= as_x_href('json') %&gt;&quot;&gt;as json&lt;/a&gt;
     &lt;% else %&gt;
       as json</diff>
      <filename>views/footer.erb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@
         &lt;div class=&quot;process_var&quot;&gt;
           &lt;span class=&quot;process_var_key&quot;&gt;&lt;%= k.to_s %&gt;&lt;/span&gt;
           =&amp;gt;
-          &lt;span class=&quot;process_var_value&quot;&gt;&lt;%= JSON.dump(v) %&gt;&lt;/span&gt;
+          &lt;span class=&quot;process_var_value&quot;&gt;&lt;%= v.to_json %&gt;&lt;/span&gt;
         &lt;/div&gt;
       &lt;% end %&gt;
     &lt;/div&gt;
@@ -81,7 +81,7 @@
 
     &lt;div class=&quot;process_representation&quot;&gt;
       Representation :&lt;br/&gt;
-      &lt;span class=&quot;process_rep&quot;&gt;&lt;%= JSON.dump(@process.process_stack.representation) %&gt;&lt;/span&gt;
+      &lt;span class=&quot;process_rep&quot;&gt;&lt;%= @process.process_stack.representation.to_json %&gt;&lt;/span&gt;
     &lt;/div&gt;
 
     &lt;br/&gt;</diff>
      <filename>views/process.erb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@
       &lt;input type=&quot;hidden&quot; name=&quot;_method&quot; value=&quot;PUT&quot; /&gt;
 
       attributes :&lt;br/&gt;
-      &lt;textarea name=&quot;attributes&quot; cols=&quot;60&quot; rows=&quot;12&quot;&gt;&lt;%= JSON.dump(@workitem.attributes) %&gt;&lt;/textarea&gt;(json)&lt;br/&gt;
+      &lt;textarea name=&quot;attributes&quot; cols=&quot;60&quot; rows=&quot;12&quot;&gt;&lt;%= @workitem.attributes.to_json %&gt;&lt;/textarea&gt;(json)&lt;br/&gt;
 
       proceed : &lt;input type=&quot;checkbox&quot; name=&quot;proceed&quot; value=&quot;proceed&quot; /&gt;&lt;br/&gt;
 </diff>
      <filename>views/workitem.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0285b501d12e1fe977f806df80fe832b4c18c5b1</id>
    </parent>
  </parents>
  <author>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </author>
  <url>http://github.com/jmettraux/ruote-rest/commit/35aef7d4093622360b274addc15c88766ac15022</url>
  <id>35aef7d4093622360b274addc15c88766ac15022</id>
  <committed-date>2008-08-02T07:03:57-07:00</committed-date>
  <authored-date>2008-08-02T07:03:57-07:00</authored-date>
  <message>todo #21419 : removed direct dependency on json gem, relying on whatever is present (activesupport or json).</message>
  <tree>90cc34ee927d224ab7e7ecd03f006a8411bbdabe</tree>
  <committer>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </committer>
</commit>
