com.fasterxml.jackson.core

Class StreamReadConstraints

  • All Implemented Interfaces:
    Serializable


    public class StreamReadConstraints
    extends Object
    implements Serializable
    The constraints to use for streaming reads: used to guard against malicious input by preventing processing of "too big" input constructs (values, structures). Constraints are registered with TokenStreamFactory (such as JsonFactory); if nothing explicitly specified, default constraints are used.

    Currently constrained aspects, with default settings, are:

    Since:
    2.15
    See Also:
    Serialized Form
    • Constructor Detail

      • StreamReadConstraints

        @Deprecated
        protected StreamReadConstraints(int maxNestingDepth,
                                                    long maxDocLen,
                                                    int maxNumLen,
                                                    int maxStringLen)
        Deprecated. 
      • StreamReadConstraints

        @Deprecated
        protected StreamReadConstraints(int maxNestingDepth,
                                                    long maxDocLen,
                                                    int maxNumLen,
                                                    int maxStringLen,
                                                    int maxNameLen)
        Deprecated. 
        Parameters:
        maxNestingDepth - Maximum input document nesting to allow
        maxDocLen - Maximum input document length to allow
        maxNumLen - Maximum number representation length to allow
        maxStringLen - Maximum String value length to allow
        maxNameLen - Maximum Object property name length to allow
        Since:
        2.16
      • StreamReadConstraints

        protected StreamReadConstraints(int maxNestingDepth,
                                        long maxDocLen,
                                        int maxNumLen,
                                        int maxStringLen,
                                        int maxNameLen,
                                        long maxTokenCount)
        Parameters:
        maxNestingDepth - Maximum input document nesting to allow
        maxDocLen - Maximum input document length to allow
        maxNumLen - Maximum number representation length to allow
        maxStringLen - Maximum String value length to allow
        maxNameLen - Maximum Object property name length to allow
        maxTokenCount - Maximum number of tokens to allow
        Since:
        2.18

Copyright © 2008–2024 FasterXML. All rights reserved.