title: JSON::ParserError: 783: unexpected token at '--- in Paper-trail gem
body: <p>I want to setup a logger activities uses paper-trail gem with ability to export data to CSV. To do so I'm using below code:</p>
  <pre><code>CSV.open(file_path, 'w', col_sep: ';', write_headers: true, headers: LOG_HEADERS, encoding: 'UTF-8') do |csv|
    PaperTrail::Version.all.each do |version|
      csv &lt;&lt; [version.whodunnit,
              version.event,
              JSON.parse(version.object_changes),
              version.created_at]
    end
  end
  </code></pre>
  <p>I'm getting an error: <code>JSON::ParserError: 783: unexpected token at '---</code></p>
  <p>So the error is related with this line <code>JSON.parse(version.object_changes)</code> but I don't know why. The JSON under the hood is like below:</p>
  <pre><code>[46] pry(main)&gt; PaperTrail::Version.last.object_changes
    PaperTrail::Version Load (0.8ms)  SELECT &quot;versions&quot;.* FROM &quot;versions&quot; ORDER BY &quot;versions&quot;.&quot;id&quot; DESC LIMIT $1  [[&quot;LIMIT&quot;, 1]]
  =&gt; &quot;---\nencrypted_password:\n- \&quot;$2a$11$ItAi513BtaFkAqJSIfECYuiaK7ngjY3dLQ1Fv.WLKz9TiBARjqu5e\&quot;\n- \&quot;$2a$11$nmB.btqqTKdjvDCGhD9E1.eyA6c/6de5PMVqBjqcwal4CPowFqsce\&quot;\nname:\n- test name\n- New - Mathias\nupdated_at:\n- 2020-08-31 21:28:45.871150000 Z\n- 2020-08-31 21:30:02.117589000 Z\n&quot;
  </code></pre>
  <p>I'm using Rails 6 and Ruby 2.7</p>