All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dynamicpdf.api.FloatJsonSerializer Maven / Gradle / Ivy

Go to download

A Java Client API that uses the DynamicPDF API to create, merge, split, form fill, stamp, secure/encrypt PDF documents.

There is a newer version: 1.10.1
Show newest version
package com.dynamicpdf.api;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

/**
 * 

This class is meant for DynamicPDF's internal usage and not supposed to be used by the client programs.

*/ public class FloatJsonSerializer extends JsonSerializer{ @Override public void serialize(Float value, JsonGenerator gen, SerializerProvider serializers) throws IOException { gen.writeNumber(Float.toString(value).replaceAll("\\.?0*$", "")); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy