Class JsonWriterCache

java.lang.Object
com.kosdev.kos.commons.util.json.JsonWriterCache

public class JsonWriterCache extends Object
Cache for JSON writers used to serialize data. As writers are thread safe, this avoids the need to create writers over and over. This is typically accessed using KosUtil.getWriters() which is a shared cache of writers that are available to all applications running in KOS.
Since:
1
Version:
1
  • Method Details

    • getWriter

      public ObjectWriter getWriter(Class<?> view)
      Returns a writer for the specified view class.
      Parameters:
      view - the view class
      Since:
      1