残りのサービスを作成するために、compojure、cheshire、および korma (および postgre db) を使用しています。このような構造を持つ 2 つの文字列フィールド (名前と説明) を持つテーブルを作成しました。
(defentity posts
(pk :id)
(table :posts)
(entity-fields :name :description))
このテーブルにレコードを挿入できますが、実行しようとすると
(defn get-all-posts []
(select posts))
サーバーから結果を返す
defroutes app-routes
(GET "/" [] (get-start))
(context "/posts" []
(GET "/" [] (get-all-posts))
...
次のようなエラーが表示されます: java.lang.IllegalArgumentException No implementation of method: :render of protocol: #'compojure.response/Renderable found for class: clojure.lang.PersistentVector
ご覧のとおり、投稿コレクションをjsonに変換する必要があります。どうやってするの?