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

org.boon.json.JsonParserAndMapper Maven / Gradle / Ivy

Go to download

Simple opinionated Java for the novice to expert level Java Programmer. Low Ceremony. High Productivity. A real boon to Java to developers!

There is a newer version: 0.34
Show newest version
/*
 * Copyright 2013-2014 Richard M. Hightower
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  		http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * __________                              _____          __   .__
 * \______   \ ____   ____   ____   /\    /     \ _____  |  | _|__| ____    ____
 *  |    |  _//  _ \ /  _ \ /    \  \/   /  \ /  \\__  \ |  |/ /  |/    \  / ___\
 *  |    |   (  <_> |  <_> )   |  \ /\  /    Y    \/ __ \|    <|  |   |  \/ /_/  >
 *  |______  /\____/ \____/|___|  / \/  \____|__  (____  /__|_ \__|___|  /\___  /
 *         \/                   \/              \/     \/     \/       \//_____/
 *      ____.                     ___________   _____    ______________.___.
 *     |    |____ ___  _______    \_   _____/  /  _  \  /   _____/\__  |   |
 *     |    \__  \\  \/ /\__  \    |    __)_  /  /_\  \ \_____  \  /   |   |
 * /\__|    |/ __ \\   /  / __ \_  |        \/    |    \/        \ \____   |
 * \________(____  /\_/  (____  / /_______  /\____|__  /_______  / / ______|
 *               \/           \/          \/         \/        \/  \/
 */

package org.boon.json;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface JsonParserAndMapper extends JsonParser {


    Map parseMap( String value );
    Map parseMap( char [] value );
    Map parseMap( byte[] value );
    Map parseMap( byte[] value, Charset charset );
    Map parseMap( InputStream value, Charset charset );
    Map parseMap( CharSequence value );
    Map parseMap( InputStream value );
    Map parseMap( Reader value );
    Map parseMapFromFile(  String file );

     List  parseList(  Class componentType, String jsonString );
     List  parseList(  Class componentType, InputStream input );
     List  parseList(  Class componentType, Reader reader );
     List  parseList(  Class componentType, InputStream input, Charset charset );
     List  parseList(  Class componentType, byte[] jsonBytes );
     List  parseList(  Class componentType, byte[] jsonBytes, Charset charset );
     List  parseList(  Class componentType, char[] chars );
     List  parseList(  Class componentType, CharSequence jsonSeq );
     List  parseListFromFile(  Class componentType, String fileName );

     T parse( Class type, String jsonString );
     T parse( Class type, byte[] bytes );
     T parse( Class type, byte[] bytes, Charset charset );
     T parse( Class type, CharSequence charSequence );
     T parse( Class type, char[] chars );
     T parse( Class type, Reader reader );
     T parse( Class type, InputStream input );
     T parse( Class type, InputStream input, Charset charset );
     T parseDirect( Class type, byte[] value );
     T parseAsStream( Class type, byte[] value );
     T parseFile( Class type,  String fileName);



    int  parseInt(  String jsonString );
    int  parseInt(  InputStream input );
    int  parseInt(  InputStream input, Charset charset );
    int  parseInt(  byte[] jsonBytes );
    int  parseInt(  byte[] jsonBytes, Charset charset );
    int  parseInt(  char[] chars );
    int  parseInt(  CharSequence jsonSeq );
    int  parseIntFromFile(  String fileName );

    long  parseLong(  String jsonString );
    long  parseLong(  InputStream input );
    long  parseLong(  InputStream input, Charset charset );
    long  parseLong(  byte[] jsonBytes );
    long  parseLong(  byte[] jsonBytes, Charset charset );
    long  parseLong(  char[] chars );
    long  parseLong(  CharSequence jsonSeq );
    long  parseLongFromFile(  String fileName );



    String  parseString(  String value );
    String  parseString(  InputStream value );
    String  parseString(  InputStream value, Charset charset );
    String  parseString(  byte[] value );
    String  parseString(  byte[] value, Charset charset );
    String  parseString(  char[] value );
    String  parseString(  CharSequence value );
    String  parseStringFromFile(  String value );

    double  parseDouble(  String value );
    double  parseDouble(  InputStream value );
    double  parseDouble(  byte[] value );
    double  parseDouble(  char[] value );
    double  parseDouble(  CharSequence value );
    double  parseDouble(  byte[] value, Charset charset );
    double  parseDouble(  InputStream value, Charset charset );
    double  parseDoubleFromFile(  String fileName );

    float  parseFloat(  String value );
    float  parseFloat(  InputStream value );
    float  parseFloat(  byte[] value );
    float  parseFloat(  char[] value );
    float  parseFloat(  CharSequence value );
    float  parseFloat(  byte[] value, Charset charset );
    float  parseFloat(  InputStream value, Charset charset );
    float  parseFloatFromFile(  String fileName );


    BigDecimal  parseBigDecimal(  String value );
    BigDecimal  parseBigDecimal(  InputStream value );
    BigDecimal  parseBigDecimal(  byte[] value );
    BigDecimal  parseBigDecimal(  char[] value );
    BigDecimal  parseBigDecimal(  CharSequence value );
    BigDecimal  parseBigDecimal(  byte[] value, Charset charset );
    BigDecimal  parseBigDecimal(  InputStream value, Charset charset );
    BigDecimal  parseBigDecimalFromFile(  String fileName );


    BigInteger  parseBigInteger(  String value );
    BigInteger  parseBigInteger(  InputStream value );
    BigInteger  parseBigInteger(  byte[] value );
    BigInteger  parseBigInteger(  char[] value );
    BigInteger  parseBigInteger(  CharSequence value );
    BigInteger  parseBigInteger(  byte[] value, Charset charset );
    BigInteger  parseBigInteger(  InputStream value, Charset charset );
    BigInteger  parseBigIntegerFile(  String fileName );

    Date  parseDate(  String jsonString );
    Date  parseDate(  InputStream input );
    Date  parseDate(  InputStream input, Charset charset );
    Date  parseDate(  byte[] jsonBytes );
    Date  parseDate(  byte[] jsonBytes, Charset charset );
    Date  parseDate(  char[] chars );
    Date  parseDate(  CharSequence jsonSeq );
    Date  parseDateFromFile(  String fileName );



    short  parseShort (  String jsonString );
    byte   parseByte  (  String jsonString );
    char   parseChar  (  String jsonString );
     T  parseEnum (  Class type, String jsonString );

    public char     [] parseCharArray   ( String jsonString );
    public byte     [] parseByteArray   ( String jsonString );
    public short    [] parseShortArray  ( String jsonString );
    public int      [] parseIntArray    ( String jsonString );
    public float    [] parseFloatArray  ( String jsonString );
    public double   [] parseDoubleArray ( String jsonString );
    public long     [] parseLongArray   ( String jsonString );


    Object parse(  String jsonString );
    Object parse(  byte[] bytes );
    Object parse(  byte[] bytes, Charset charset );
    Object parse(  CharSequence charSequence );
    Object parse(  char[] chars );
    Object parse(  Reader reader );
    Object parse(  InputStream input );
    Object parse(  InputStream input, Charset charset );
    Object parseDirect(  byte[] value );
    Object parseAsStream(  byte[] value );
    Object parseFile(  String fileName);


    void close();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy