update copyright years to 2019
[akkoma] / lib / pleroma / web / twitter_api / representers / base_representer.ex
index a4ef245fc687195356239c4a0961d0175e978a19..3d31e60795cee7a6aa67b45b49d7fe3ff36635c1 100644 (file)
@@ -1,15 +1,22 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Web.TwitterAPI.Representers.BaseRepresenter do
   defmacro __using__(_opts) do
     quote do
-      def to_json(object) do to_json(object, %{}) end
+      def to_json(object) do
+        to_json(object, %{})
+      end
+
       def to_json(object, options) do
         object
         |> to_map(options)
-        |> Poison.encode!
+        |> Jason.encode!()
       end
 
       def enum_to_list(enum, options) do
-        mapping = fn (el) -> to_map(el, options) end
+        mapping = fn el -> to_map(el, options) end
         Enum.map(enum, mapping)
       end
 
@@ -17,11 +24,14 @@ defmodule Pleroma.Web.TwitterAPI.Representers.BaseRepresenter do
         to_map(object, %{})
       end
 
-      def enum_to_json(enum) do enum_to_json(enum, %{}) end
+      def enum_to_json(enum) do
+        enum_to_json(enum, %{})
+      end
+
       def enum_to_json(enum, options) do
         enum
         |> enum_to_list(options)
-        |> Poison.encode!
+        |> Jason.encode!()
       end
     end
   end