title: converting json object to string in clojure
body: <p>I am trying to display a json object from a table to UI screen using clojure,sql korma and angularJS. I have a table with a column's data type as json.The data base is postgres.When I am trying to run the code, I am getting the an error.
      My code to query the DB is below.</p>
  
  <pre><code><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>(ns error_api_transactions.models.bre_dve_errors_api_transactions
    (:require [debug.logger :as logger])
    (:use [korma.core]
          [core.config.db]
          [utils.gen_password]
          [core.file-store]
          [utils.uuid :as utils-uuid]))
  
  
  (defentity bre_errors
    (pk :id)
    (table :bre_errors)
    (database master-db))
  
  (defentity dve_errors
    (pk :id)
    (table :dve_errors)
    (database master-db))
  
   (defentity vendor_detail
    (pk :id)
    (table :vendor)
    (database master-db))
  
  
      (defn get-all-bre-errors
         ^{:Comments ""}
         []
        
  
        
         
         (select bre_errors
                         (fields [:vendor_id :vendor_id]
                                 [:error_json]
                                 [:error_xml :error_xml]
                                 [:input :input]
                                 [:created_on :created_on]
                                 [:updated_on :updated_on]
                                 [:deleted_on :deleted_on]
                                 [:po_number :po_number]
                                 [:purchase_order_id :purchase_order_i])
                         )
  
        )</code></pre>
  </div>
  </div>
  
  </code></pre>
  
  <p>Error is:
      com.fasterxml.jackson.core.JsonGenerationException: Cannot JSON encode object of class: class org.postgresql.util.PGobject: ["Container Numbers in all nodes must be consistent"]</p>
  
  <p>I do not know if we can use any toString methods of java here to <code>enter code here</code>convert JSON to normal string.
  Any help is highly appreciated</p>