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

com.github.pgelinas.jackson.javax.json.stream.JacksonLocation Maven / Gradle / Ivy

package com.github.pgelinas.jackson.javax.json.stream;

import javax.json.stream.*;

public class JacksonLocation implements JsonLocation {

    private com.fasterxml.jackson.core.JsonLocation _location;

    public JacksonLocation(com.fasterxml.jackson.core.JsonLocation location) {
        _location = location;
    }

    @Override
    public long getLineNumber() {
        return _location.getLineNr();
    }

    @Override
    public long getColumnNumber() {
        return _location.getColumnNr() -1;
    }

    @Override
    public long getStreamOffset() {
        long byteOffset = _location.getByteOffset();
        return byteOffset == -1 ? _location.getCharOffset() : byteOffset;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy