javax.json.stream

Interface JsonLocation


  • public interface JsonLocation
    Provides the location information of a JSON event in an input source. The JsonLocation information can be used to identify incorrect JSON or can be used by higher frameworks to know about the processing location.

    All the information provided by a JsonLocation is optional. For example, a provider may only report line numbers. Also, there may not be any location information for an input source. For example, if a JsonParser is created using JsonArray input source, all the methods in this class return -1.

    Author:
    Jitendra Kotamraju
    See Also:
    JsonParser, JsonParsingException
    • Method Detail

      • getLineNumber

        long getLineNumber()
        Return the line number for the current JSON event in the input source.
        Returns:
        the line number or -1 if none is available
      • getColumnNumber

        long getColumnNumber()
        Return the column number for the current JSON event in the input source.
        Returns:
        the column number or -1 if none is available
      • getStreamOffset

        long getStreamOffset()
        Return the stream offset into the input source this location is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. Returns -1 if there is no offset available.
        Returns:
        the offset of input source stream, or -1 if there is no offset available

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/json/stream/JsonLocation.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com/en/java/, Interface JsonLocation

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.