Skip to content

Commit

Permalink
Add TagsSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Dec 24, 2021
1 parent 0e3bd8c commit d7c878e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions modules/qrest/src/main/java/org/jpos/qrest/TagsSerializer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* jPOS Project [http://jpos.org]
* Copyright (C) 2000-2021 jPOS Software SRL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.jpos.qrest;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.jpos.util.Tags;

import java.io.IOException;

public class TagsSerializer extends JsonSerializer<Tags> {
@Override
public void serialize(Tags tags, JsonGenerator gen, SerializerProvider serializers) throws IOException {
gen.writeString(tags.toString());
}
}

0 comments on commit d7c878e

Please sign in to comment.