Repository: apple/swift-http-structured-headers Branch: main Commit: 933538faa42c Files: 69 Total size: 1.2 MB Directory structure: gitextract_vxft_rju/ ├── .editorconfig ├── .github/ │ ├── release.yml │ └── workflows/ │ ├── main.yml │ ├── pull_request.yml │ └── pull_request_label.yml ├── .gitignore ├── .licenseignore ├── .spi.yml ├── .swift-format ├── CONTRIBUTORS.txt ├── LICENSE.txt ├── Package.swift ├── README.md ├── Sources/ │ ├── RawStructuredFieldValues/ │ │ ├── ASCII.swift │ │ ├── ComponentTypes.swift │ │ ├── Docs.docc/ │ │ │ └── index.md │ │ ├── Errors.swift │ │ ├── FieldParser.swift │ │ ├── FieldSerializer.swift │ │ ├── OrderedMap.swift │ │ └── PseudoDecimal.swift │ ├── StructuredFieldValues/ │ │ ├── Decoder/ │ │ │ ├── BareInnerListDecoder.swift │ │ │ ├── BareItemDecoder.swift │ │ │ ├── DictionaryKeyedContainer.swift │ │ │ ├── KeyedInnerListDecoder.swift │ │ │ ├── KeyedItemDecoder.swift │ │ │ ├── KeyedTopLevelListDecoder.swift │ │ │ ├── ParametersDecoder.swift │ │ │ ├── StructuredFieldValueDecoder.swift │ │ │ ├── StructuredHeaderCodingKey.swift │ │ │ └── TopLevelListDecoder.swift │ │ ├── DisplayString.swift │ │ ├── Docs.docc/ │ │ │ └── index.md │ │ ├── Encoder/ │ │ │ ├── StructuredFieldKeyedEncodingContainer.swift │ │ │ ├── StructuredFieldUnkeyedEncodingContainer.swift │ │ │ └── StructuredFieldValueEncoder.swift │ │ └── StructuredFieldValue.swift │ └── sh-parser/ │ └── main.swift ├── Tests/ │ ├── StructuredFieldValuesTests/ │ │ ├── Base32.swift │ │ ├── Fixtures.swift │ │ ├── StructuredFieldDecoderTests.swift │ │ ├── StructuredFieldEncoderTests.swift │ │ ├── StructuredFieldParserTests.swift │ │ └── StructuredFieldSerializerTests.swift │ └── TestFixtures/ │ ├── binary.json │ ├── boolean.json │ ├── date.json │ ├── dictionary.json │ ├── display-string.json │ ├── examples.json │ ├── item.json │ ├── key-generated.json │ ├── large-generated.json │ ├── list.json │ ├── listlist.json │ ├── number-generated.json │ ├── number.json │ ├── param-dict.json │ ├── param-list.json │ ├── param-listlist.json │ ├── serialisation-tests/ │ │ ├── key-generated.json │ │ ├── number.json │ │ ├── string-generated.json │ │ └── token-generated.json │ ├── string-generated.json │ ├── string.json │ ├── token-generated.json │ └── token.json └── dev/ └── git.commit.template ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] indent_style = space indent_size = 4 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .github/release.yml ================================================ changelog: categories: - title: SemVer Major labels: - ⚠️ semver/major - title: SemVer Minor labels: - 🆕 semver/minor - title: SemVer Patch labels: - 🔨 semver/patch - title: Other Changes labels: - semver/none ================================================ FILE: .github/workflows/main.yml ================================================ name: Main permissions: contents: read on: push: branches: [main] schedule: - cron: "0 8,20 * * *" jobs: unit-tests: name: Unit tests uses: apple/swift-nio/.github/workflows/unit_tests.yml@main with: linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_3_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" static-sdk: name: Static SDK uses: apple/swift-nio/.github/workflows/static_sdk.yml@main macos-tests: name: macOS tests uses: apple/swift-nio/.github/workflows/macos_tests.yml@main with: runner_pool: nightly build_scheme: swift-http-structured-headers-Package xcode_16_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable" xcode_16_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable" release-builds: name: Release builds uses: apple/swift-nio/.github/workflows/release_builds.yml@main ================================================ FILE: .github/workflows/pull_request.yml ================================================ name: PR permissions: contents: read on: pull_request: types: [opened, reopened, synchronize] jobs: soundness: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.7 with: license_header_check_project_name: "SwiftNIO" unit-tests: name: Unit tests uses: apple/swift-nio/.github/workflows/unit_tests.yml@main with: linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_6_3_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" cxx-interop: name: Cxx interop uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main static-sdk: name: Static SDK uses: apple/swift-nio/.github/workflows/static_sdk.yml@main macos-tests: name: macOS tests uses: apple/swift-nio/.github/workflows/macos_tests.yml@main with: runner_pool: general build_scheme: swift-http-structured-headers-Package xcode_16_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable" xcode_16_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable" release-builds: name: Release builds uses: apple/swift-nio/.github/workflows/release_builds.yml@main ================================================ FILE: .github/workflows/pull_request_label.yml ================================================ name: PR label permissions: contents: read on: pull_request: types: [labeled, unlabeled, opened, reopened, synchronize] jobs: semver-label-check: name: Semantic version label check runs-on: ubuntu-latest timeout-minutes: 1 steps: - name: Checkout repository uses: actions/checkout@v6 with: persist-credentials: false - name: Check for Semantic Version label uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main ================================================ FILE: .gitignore ================================================ .DS_Store /.build /Packages /*.xcodeproj xcuserdata/ .swiftpm/ Package.resolved ================================================ FILE: .licenseignore ================================================ .gitignore **/.gitignore .licenseignore .gitattributes .git-blame-ignore-revs .mailfilter .mailmap .spi.yml .swift-format .editorconfig .github/* *.md *.txt *.yml *.yaml *.json Package.swift **/Package.swift Package@-*.swift **/Package@-*.swift Package.resolved **/Package.resolved Makefile *.modulemap **/*.modulemap **/*.docc/* *.xcprivacy **/*.xcprivacy *.symlink **/*.symlink Dockerfile **/Dockerfile Snippets/* dev/git.commit.template .unacceptablelanguageignore ================================================ FILE: .spi.yml ================================================ version: 1 builder: configs: - documentation_targets: [RawStructuredFieldValues, StructuredFieldValues] ================================================ FILE: .swift-format ================================================ { "version" : 1, "indentation" : { "spaces" : 4 }, "tabWidth" : 4, "fileScopedDeclarationPrivacy" : { "accessLevel" : "private" }, "spacesAroundRangeFormationOperators" : false, "indentConditionalCompilationBlocks" : false, "indentSwitchCaseLabels" : false, "lineBreakAroundMultilineExpressionChainComponents" : false, "lineBreakBeforeControlFlowKeywords" : false, "lineBreakBeforeEachArgument" : true, "lineBreakBeforeEachGenericRequirement" : true, "lineLength" : 120, "maximumBlankLines" : 1, "respectsExistingLineBreaks" : true, "prioritizeKeepingFunctionOutputTogether" : true, "noAssignmentInExpressions" : { "allowedFunctions" : [ "XCTAssertNoThrow", "XCTAssertThrowsError" ] }, "rules" : { "AllPublicDeclarationsHaveDocumentation" : false, "AlwaysUseLiteralForEmptyCollectionInit" : false, "AlwaysUseLowerCamelCase" : false, "AmbiguousTrailingClosureOverload" : true, "BeginDocumentationCommentWithOneLineSummary" : false, "DoNotUseSemicolons" : true, "DontRepeatTypeInStaticProperties" : true, "FileScopedDeclarationPrivacy" : true, "FullyIndirectEnum" : true, "GroupNumericLiterals" : true, "IdentifiersMustBeASCII" : true, "NeverForceUnwrap" : false, "NeverUseForceTry" : false, "NeverUseImplicitlyUnwrappedOptionals" : false, "NoAccessLevelOnExtensionDeclaration" : true, "NoAssignmentInExpressions" : true, "NoBlockComments" : true, "NoCasesWithOnlyFallthrough" : true, "NoEmptyTrailingClosureParentheses" : true, "NoLabelsInCasePatterns" : true, "NoLeadingUnderscores" : false, "NoParensAroundConditions" : true, "NoVoidReturnOnFunctionSignature" : true, "OmitExplicitReturns" : true, "OneCasePerLine" : true, "OneVariableDeclarationPerLine" : true, "OnlyOneTrailingClosureArgument" : true, "OrderedImports" : true, "ReplaceForEachWithForLoop" : true, "ReturnVoidInsteadOfEmptyTuple" : true, "UseEarlyExits" : false, "UseExplicitNilCheckInConditions" : false, "UseLetInEveryBoundCaseVariable" : false, "UseShorthandTypeNames" : true, "UseSingleLinePropertyGetter" : false, "UseSynthesizedInitializer" : false, "UseTripleSlashForDocumentationComments" : true, "UseWhereClausesInForLoops" : false, "ValidateDocumentationComments" : false } } ================================================ FILE: CONTRIBUTORS.txt ================================================ For the purpose of tracking copyright, this is the list of individuals and organizations who have contributed source code to SwiftNIO. For employees of an organization/company where the copyright of work done by employees of that company is held by the company itself, only the company needs to be listed here. ## COPYRIGHT HOLDERS - Apple Inc. (all contributors with '@apple.com') ### Contributors - Cory Benfield **Updating this list** Please do not edit this file manually. It is generated using `./scripts/generate_contributors_list.sh`. If a name is misspelled or appearing multiple times: add an entry in `./.mailmap` ================================================ FILE: LICENSE.txt ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. ================================================ FILE: Package.swift ================================================ // swift-tools-version:6.1 //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2022 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import PackageDescription let strictConcurrencyDevelopment = false let strictConcurrencySettings: [SwiftSetting] = { var initialSettings: [SwiftSetting] = [] if strictConcurrencyDevelopment { // -warnings-as-errors here is a workaround so that IDE-based development can // get tripped up on -require-explicit-sendable. initialSettings.append(.unsafeFlags(["-require-explicit-sendable", "-warnings-as-errors"])) } return initialSettings }() let package = Package( name: "swift-http-structured-headers", products: [ .library( name: "StructuredFieldValues", targets: ["StructuredFieldValues"] ), .library( name: "RawStructuredFieldValues", targets: ["RawStructuredFieldValues"] ), ], targets: [ .target( name: "RawStructuredFieldValues", dependencies: [], swiftSettings: strictConcurrencySettings ), .target( name: "StructuredFieldValues", dependencies: ["RawStructuredFieldValues"], swiftSettings: strictConcurrencySettings ), .executableTarget( name: "sh-parser", dependencies: ["RawStructuredFieldValues"], swiftSettings: strictConcurrencySettings ), .testTarget( name: "StructuredFieldValuesTests", dependencies: ["RawStructuredFieldValues", "StructuredFieldValues"], swiftSettings: strictConcurrencySettings ), ] ) // --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // for target in package.targets { switch target.type { case .regular, .test, .executable: var settings = target.swiftSettings ?? [] // https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md settings.append(.enableUpcomingFeature("MemberImportVisibility")) target.swiftSettings = settings case .macro, .plugin, .system, .binary: () // not applicable @unknown default: () // we don't know what to do here, do nothing } } // --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // ================================================ FILE: README.md ================================================ # swift-http-structured-headers A Swift implementation of the HTTP Structured Header Field Value specification. Provides parsing and serialization facilities for structured header field values, as well as implementations of `Encoder` and `Decoder` to allow using `Codable` data types as the payloads of HTTP structured header fields. ## About Structured Header Field Values HTTP Structured Header Field Values are a HTTP extension recorded in [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values. ## Swift HTTP Structured Header Field Values This package provides a parser and serializer that implement RFC 9651. They are entirely complete, able to handle all valid HTTP structured header field values. This package also provides `Encoder` and `Decoder` objects for working with Codable in Swift. This allows rapid prototyping and experimentation with HTTP structured header field values, as well as interaction with the wider Swift Codable community. This package provides two top-level modules: `StructuredFieldValues` and `RawStructuredFieldValues`. The base module, `RawStructuredFieldValues`, provides a low-level implementation of a serializer and parser. Both of these have been written to avoid using Foundation, making them suitable for a range of use-cases where Foundation is not available. They rely entirely on the Swift standard library and are implemented as generically as possible. One of the limitations due to the absence of Foundation is that this interface is not capable of performing Base64 encoding or decoding: users are free to bring whatever encoder and decoder they choose to use. This API is low-level, exposing the raw parse tree as the format for the serializer and parser. This allows high-performance and high-flexibility parsing and serialization, at the cost of being verbose and complex. Users are required to understand the structured header format and to operate the slightly awkward types, but maximal fidelity is retained and the performance overhead is low. The upper-level module, `StructuredFieldValues`, brings along the `Encoder` and `Decoder` and also adds a dependency on Foundation. This Foundation dependency is necessary to correctly handle the base64 formatting, as well as to provide a good natural container for binary data: `Data`, and for dates: `Date`. This interface is substantially friendlier and easier to work with, using Swift's `Codable` support to provide a great user experience. In most cases users should prefer to use `StructuredFieldValues` unless they know they need the performance advantages of `RawStructuredFieldValues`. The experience will be much better. ## Working with Structured Header Field Values `swift-http-structured-headers` has a simple, easy-to-use high-level API for working with structured header field values. To begin with, let's consider the [HTTP Client Hints specification](https://www.rfc-editor.org/rfc/rfc8942.html). This defines the following new header field: > The Accept-CH response header field indicates server support for the hints indicated in its value. Servers wishing to receive user agent information through Client Hints SHOULD add Accept-CH response header to their responses as early as possible. > > Accept-CH is a Structured Header. Its value MUST be an sf-list whose members are tokens. Its ABNF is: > > Accept-CH = sf-list > > For example: > > Accept-CH: Sec-CH-Example, Sec-CH-Example-2 `swift-http-structured-headers` can parse and serialize this field very simply: ```swift let field = Array("Sec-CH-Example, Sec-CH-Example-2".utf8) struct AcceptCH: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .list var items: [String] } // Decoding let decoder = StructuredFieldValueDecoder() let parsed = try decoder.decode(AcceptCH.self, from: field) // Encoding let encoder = StructuredFieldValueEncoder() let serialized = try encoder.encode(AcceptCH(items: ["Sec-CH-Example", "Sec-CH-Example-2"])) ``` However, structured header field values can be substantially more complex. Structured header fields can make use of 4 containers and 8 base item types. The containers are: 1. Dictionaries. These are top-level elements and associate token keys with values. The values may be items, or may be inner lists, and each value may also have parameters associated with them. `StructuredFieldValues` can model dictionaries as either Swift objects (where the property names are dictionary keys). 2. Lists. These are top-level elements, providing a sequence of items or inner lists. Each item or inner list may have parameters associated with them. `StructuredFieldValues` models these as Swift objects with one key, `items`, that must be a collection of entries. 3. Inner Lists. These are lists that may be sub-entries of a dictionary or a list. The list entries are items, which may have parameters associated with them: additionally, an inner list may have parameters associated with itself as well. `StructuredFieldValues` models these as either Swift `Array`s _or_, if it's important to extract parameters, as a two-field Swift `struct` where one field is called `items` and contains an `Array`, and other field is called `parameters` and contains a dictionary. 4. Parameters. Parameters associate token keys with items without parameters. These are used to store metadata about objects within a field. `StructuredFieldValues` models these as either Swift objects (where the property names are the parameter keys) or as Swift dictionaries. The base types are: 1. Booleans. `StructuredFieldValues` models these as Swift's `Bool` type. 2. Integers. `StructuredFieldValues` models these as any fixed-width integer type. 3. Decimals. `StructuredFieldValues` models these as any floating-point type, or as Foundation's `Decimal`. 4. Tokens. `StructuredFieldValues` models these as Swift's `String` type, where the range of characters is restricted. 5. Strings. `StructuredFieldValues` models these as Swift's `String` type. 6. Binary data. `StructuredFieldValues` models this as Foundation's `Data` type. 7. Dates. `StructuredFieldValues` models these as Foundation's `Date` type. 8. Display strings. `StructuredFieldValues` models these as the `DisplayString` type which it provides. For any Structured Header Field Value Item, the item may either be represented directly by the appropriate type, or by a Swift struct with two properties: `item` and `parameters`. This latter mode is how parameters on a given item may be captured. The top-level Structured Header Field Value must identify what kind of header field it corresponds to: `.item`, `.list`, or `.dictionary`. This is inherent in the type of the field and will be specified in the relevant field specification. ## Lower Levels In some cases the Codable interface will not be either performant enough or powerful enough for the intended use-case. In cases like this, users can use the types in the `RawStructuredFieldValues` module instead. There are two core types: `StructuredFieldValueParser` and `StructuredFieldValueSerializer`. Rather than work with high-level Swift objects, these two objects either produce or accept a Swift representation of the data tree for a given structured header field. This exposes the maximum amount of information about the header field. It allows users to handle situations where Codable cannot necessarily provide the relevant information, such in cases where dictionary ordering is semantic, or where it's necessary to control whether fields are tokens or strings more closely. These APIs also have lower overhead than the `StructuredFieldValues` APIs. The cost is that the APIs are substantially more verbose. Consider the above header field, `Accept-CH`. To parse or serialize this in `RawStructuredFieldValues` would look like this: ```swift let field = Array("Sec-CH-Example, Sec-CH-Example-2".utf8) var parser = StructuredFieldValueParser(field) let parsed = parser.parseListFieldValue() print(parsed) // [ // .item(Item(bareItem: .token("Sec-CH-Example"), parameters: [])), // .item(Item(bareItem: .token("Sec-CH-Example-2"), parameters: [])), // ] var serializer = StructuredFieldValueSerializer() let serialized = serializer.writeListFieldValue(parsed) ``` Notice the substantially more verbose types involved in this operation. These types are highly generic, giving the opportunity for parsing and serializing that greatly reduces the runtime overhead. They also make it easier to distinguish between tokens and strings, and to observe the order of objects in dictionaries or parameters, which can be lost at the Codable level. In general, users should consider this API only when they are confident they need either the flexibility or the performance. This may be valuable for header fields that do not evolve often, or that are highly dynamic. ## Security swift-http-structured-headers has a security policy outlined in [SECURITY.md](SECURITY.md). ================================================ FILE: Sources/RawStructuredFieldValues/ASCII.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// let asciiSpace = UInt8(ascii: " ") let asciiTab = UInt8(ascii: "\t") let asciiOpenParenthesis = UInt8(ascii: "(") let asciiCloseParenthesis = UInt8(ascii: ")") let asciiDash = UInt8(ascii: "-") let asciiUnderscore = UInt8(ascii: "_") let asciiZero = UInt8(ascii: "0") let asciiOne = UInt8(ascii: "1") let asciiNine = UInt8(ascii: "9") let asciiDigits = asciiZero...asciiNine let asciiDquote = UInt8(ascii: "\"") let asciiColon = UInt8(ascii: ":") let asciiSemicolon = UInt8(ascii: ";") let asciiBackslash = UInt8(ascii: "\\") let asciiQuestionMark = UInt8(ascii: "?") let asciiExclamationMark = UInt8(ascii: "!") let asciiAt = UInt8(ascii: "@") let asciiOctothorpe = UInt8(ascii: "#") let asciiDollar = UInt8(ascii: "$") let asciiPercent = UInt8(ascii: "%") let asciiAmpersand = UInt8(ascii: "&") let asciiSquote = UInt8(ascii: "'") let asciiCaret = UInt8(ascii: "^") let asciiBacktick = UInt8(ascii: "`") let asciiPipe = UInt8(ascii: "|") let asciiTilde = UInt8(ascii: "~") let asciiAsterisk = UInt8(ascii: "*") let asciiEqual = UInt8(ascii: "=") let asciiPlus = UInt8(ascii: "+") let asciiSlash = UInt8(ascii: "/") let asciiPeriod = UInt8(ascii: ".") let asciiComma = UInt8(ascii: ",") let asciiCapitalA = UInt8(ascii: "A") let asciiCapitalF = UInt8(ascii: "F") let asciiCapitalZ = UInt8(ascii: "Z") let asciiLowerA = UInt8(ascii: "a") let asciiLowerF = UInt8(ascii: "f") let asciiLowerZ = UInt8(ascii: "z") let asciiCapitals = asciiCapitalA...asciiCapitalZ let asciiLowercases = asciiLowerA...asciiLowerZ let asciiHexCapitals = asciiCapitalA...asciiCapitalF let asciiHexLowercases = asciiLowerA...asciiLowerF ================================================ FILE: Sources/RawStructuredFieldValues/ComponentTypes.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// // This file contains common, currency, component types. // // These types are used by the parser, the serializer, and by users of the direct encoding/decoding APIs. // They are not used by those using the Codable interface. // MARK: - ItemOrInnerList /// `ItemOrInnerList` represents the values in a structured header dictionary, or the /// entries in a structured header list. public enum ItemOrInnerList: Sendable { case item(Item) case innerList(InnerList) } extension ItemOrInnerList: Hashable {} // MARK: - BareItem /// `BareItem` is a representation of the base data types at the bottom of a structured /// header field. These types are not parameterised: they are raw data. @available(*, deprecated, renamed: "RFC9651BareItem") public enum BareItem: Sendable { /// A boolean item. case bool(Bool) /// An integer item. case integer(Int) /// A decimal item. case decimal(PseudoDecimal) /// A string item. case string(String) /// A byte sequence. This case must contain base64-encoded data, as /// `StructuredHeaders` does not do base64 encoding or decoding. case undecodedByteSequence(String) /// A token item. case token(String) } @available(*, deprecated) extension BareItem: ExpressibleByBooleanLiteral { public init(booleanLiteral value: Bool) { self = .bool(value) } } @available(*, deprecated) extension BareItem: ExpressibleByIntegerLiteral { public init(integerLiteral value: Int) { self = .integer(value) } } @available(*, deprecated) extension BareItem: ExpressibleByFloatLiteral { public init(floatLiteral value: Float64) { self = .decimal(.init(floatLiteral: value)) } } @available(*, deprecated) extension BareItem: ExpressibleByStringLiteral { public init(stringLiteral value: StringLiteralType) { if value.structuredHeadersIsValidToken { self = .token(value) } else { self = .string(value) } } } @available(*, deprecated) extension BareItem { init(transforming newItem: RFC9651BareItem) throws { switch newItem { case .bool(let b): self = .bool(b) case .integer(let i): self = .integer(Int(i)) case .decimal(let d): self = .decimal(d) case .string(let s): self = .string(s) case .undecodedByteSequence(let s): self = .undecodedByteSequence(s) case .token(let t): self = .token(t) case .date: throw StructuredHeaderError.invalidItem case .displayString: throw StructuredHeaderError.invalidItem } } } @available(*, deprecated) extension BareItem: Hashable {} /// `RFC9651BareItem` is a representation of the base data types at the bottom of a structured /// header field. These types are not parameterised: they are raw data. public enum RFC9651BareItem: Sendable { /// A boolean item. case bool(Bool) /// An integer item. case integer(Int64) /// A decimal item. case decimal(PseudoDecimal) /// A string item. case string(String) /// A byte sequence. This case must contain base64-encoded data, as /// `StructuredHeaders` does not do base64 encoding or decoding. case undecodedByteSequence(String) /// A token item. case token(String) /// A date item. case date(Int64) /// A display string item. case displayString(String) } extension RFC9651BareItem: ExpressibleByBooleanLiteral { public init(booleanLiteral value: Bool) { self = .bool(value) } } extension RFC9651BareItem: ExpressibleByIntegerLiteral { public init(integerLiteral value: Int64) { self = .integer(value) } } extension RFC9651BareItem: ExpressibleByFloatLiteral { public init(floatLiteral value: Float64) { self = .decimal(.init(floatLiteral: value)) } } extension RFC9651BareItem: ExpressibleByStringLiteral { public init(stringLiteral value: StringLiteralType) { if value.structuredHeadersIsValidToken { self = .token(value) } else { self = .string(value) } } } extension RFC9651BareItem { @available(*, deprecated) init(transforming oldItem: BareItem) throws { switch oldItem { case .bool(let b): self = .bool(b) case .integer(let i): self = .integer(Int64(i)) case .decimal(let d): self = .decimal(d) case .string(let s): self = .string(s) case .undecodedByteSequence(let s): self = .undecodedByteSequence(s) case .token(let t): self = .token(t) } } } extension RFC9651BareItem: Hashable {} // MARK: - Item /// `Item` represents a structured header field item: a combination of a `bareItem` /// and some parameters. public struct Item: Sendable { /// The `BareItem` that this `Item` contains. @available(*, deprecated, renamed: "rfc9651BareItem") public var bareItem: BareItem { get { try! .init(transforming: self.rfc9651BareItem) } set { try! self.rfc9651BareItem = .init(transforming: newValue) } } /// The parameters associated with `bareItem` @available(*, deprecated, renamed: "rfc9651Parameters") public var parameters: OrderedMap { get { try! self.rfc9651Parameters.mapValues { try .init(transforming: $0) } } set { try! self.rfc9651Parameters = newValue.mapValues { try .init(transforming: $0) } } } /// The `BareItem` that this `Item` contains. public var rfc9651BareItem: RFC9651BareItem /// The parameters associated with `rfc9651BareItem` public var rfc9651Parameters: OrderedMap @available(*, deprecated) public init(bareItem: BareItem, parameters: OrderedMap) { self.rfc9651BareItem = .integer(1) self.rfc9651Parameters = OrderedMap() self.bareItem = bareItem self.parameters = parameters } public init(bareItem: RFC9651BareItem, parameters: OrderedMap) { self.rfc9651BareItem = bareItem self.rfc9651Parameters = parameters } } extension Item: Hashable {} // MARK: - BareInnerList /// A `BareInnerList` represents the items contained within an ``InnerList``, without /// the associated parameters. public struct BareInnerList: Hashable, Sendable { private var items: [Item] public init() { self.items = [] } public mutating func append(_ item: Item) { self.items.append(item) } } extension BareInnerList: ExpressibleByArrayLiteral { public init(arrayLiteral elements: Item...) { self.items = elements } } // TODO: RangeReplaceableCollection I guess extension BareInnerList: RandomAccessCollection, MutableCollection { public struct Index: Sendable { fileprivate var baseIndex: Array.Index init(_ baseIndex: Array.Index) { self.baseIndex = baseIndex } } public var count: Int { self.items.count } public var startIndex: Index { Index(self.items.startIndex) } public var endIndex: Index { Index(self.items.endIndex) } public func index(after i: Index) -> Index { Index(self.items.index(after: i.baseIndex)) } public func index(before i: Index) -> Index { Index(self.items.index(before: i.baseIndex)) } public func index(_ i: Index, offsetBy offset: Int) -> Index { Index(self.items.index(i.baseIndex, offsetBy: offset)) } public subscript(index: Index) -> Item { get { self.items[index.baseIndex] } set { self.items[index.baseIndex] = newValue } } } extension BareInnerList.Index: Hashable {} extension BareInnerList.Index: Comparable { public static func < (lhs: Self, rhs: Self) -> Bool { lhs.baseIndex < rhs.baseIndex } } // MARK: - InnerList /// An `InnerList` is a list of items, with some associated parameters. public struct InnerList: Hashable, Sendable { /// The items contained within this inner list. public var bareInnerList: BareInnerList /// The parameters associated with the `bareInnerList`. @available(*, deprecated, renamed: "rfc9651Parameters") public var parameters: OrderedMap { get { try! self.rfc9651Parameters.mapValues { try .init(transforming: $0) } } set { try! self.rfc9651Parameters = newValue.mapValues { try .init(transforming: $0) } } } /// The parameters associated with the `bareInnerList`. public var rfc9651Parameters: OrderedMap @available(*, deprecated) public init(bareInnerList: BareInnerList, parameters: OrderedMap) { self.rfc9651Parameters = OrderedMap() self.bareInnerList = bareInnerList self.parameters = parameters } public init(bareInnerList: BareInnerList, parameters: OrderedMap) { self.bareInnerList = bareInnerList self.rfc9651Parameters = parameters } } extension String { /// Whether this string is a valid structured headers token, or whether it would /// need to be stored in a structured headers string. public var structuredHeadersIsValidToken: Bool { let view = self.utf8 switch view.first { case .some(asciiCapitals), .some(asciiLowercases), .some(asciiAsterisk): // Good () default: return false } for byte in view { switch byte { // Valid token characters are RFC 7230 tchar, colon, and slash. // tchar is: // // tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" // / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" // / DIGIT / ALPHA // // The following unfortunate case statement covers this. Tokens; not even once. case asciiExclamationMark, asciiOctothorpe, asciiDollar, asciiPercent, asciiAmpersand, asciiSquote, asciiAsterisk, asciiPlus, asciiDash, asciiPeriod, asciiCaret, asciiUnderscore, asciiBacktick, asciiPipe, asciiTilde, asciiDigits, asciiCapitals, asciiLowercases, asciiColon, asciiSlash: // Good () default: // Bad token return false } } return true } } ================================================ FILE: Sources/RawStructuredFieldValues/Docs.docc/index.md ================================================ # ``RawStructuredFieldValues`` A Swift implementation of the HTTP Structured Header Field Value specification. Provides parsing and serialization facilities for structured header field values. ## Overview ### About Structured Header Field Values HTTP Structured Header Field Values are a HTTP extension recorded in [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values. ### Swift HTTP Structured Header Field Values This package provides a parser and serializer that implement RFC 9651. They are entirely complete, able to handle all valid HTTP structured header field values. This package provides two top-level modules: `StructuredFieldValues` and `RawStructuredFieldValues`. This module, `RawStructuredFieldValues`, provides a low-level implementation of a serializer and parser. Both of these have been written to avoid using Foundation, making them suitable for a range of use-cases where Foundation is not available. They rely entirely on the Swift standard library and are implemented as generically as possible. One of the limitations due to the absence of Foundation is that this interface is not capable of performing Base64 encoding or decoding: users are free to bring whatever encoder and decoder they choose to use. This API is low-level, exposing the raw parse tree as the format for the serializer and parser. This allows high-performance and high-flexibility parsing and serialization, at the cost of being verbose and complex. Users are required to understand the structured header format and to operate the slightly awkward types, but maximal fidelity is retained and the performance overhead is low. The upper-level module, `StructuredFieldValues`, brings along the `Encoder` and `Decoder` and also adds a dependency on Foundation. This Foundation dependency is necessary to correctly handle the base64 formatting, as well as to provide a good natural container for binary data: `Data`, and for dates: `Date`. This interface is substantially friendlier and easier to work with, using Swift's `Codable` support to provide a great user experience. In most cases users should prefer to use `StructuredFieldValues` unless they know they need the performance advantages of `RawStructuredFieldValues`. The experience will be much better. ### Working with Structured Header Field Values `RawStructuredFieldValues` has a powerful API for working with structured header field values. There are two core types: ``StructuredFieldValueParser`` and ``StructuredFieldValueSerializer``. Rather than work with high-level Swift objects, these two objects either produce or accept a Swift representation of the data tree for a given structured header field. This exposes the maximum amount of information about the header field. It allows users to handle situations where `Codable` cannot necessarily provide the relevant information, such in cases where dictionary ordering is semantic, or where it's necessary to control whether fields are tokens or strings more closely. These APIs also have lower overhead than the `StructuredFieldValues` APIs. The cost is that the APIs are substantially more verbose. As an example, let's consider the [HTTP Client Hints specification](https://www.rfc-editor.org/rfc/rfc8942.html). This defines the following new header field: ``` The Accept-CH response header field indicates server support for the hints indicated in its value. Servers wishing to receive user agent information through Client Hints SHOULD add Accept-CH response header to their responses as early as possible. Accept-CH is a Structured Header. Its value MUST be an sf-list whose members are tokens. Its ABNF is: Accept-CH = sf-list For example: Accept-CH: Sec-CH-Example, Sec-CH-Example-2 ``` To parse or serialize this in `RawStructuredFieldValues` would look like this: ```swift let field = Array("Sec-CH-Example, Sec-CH-Example-2".utf8) var parser = StructuredFieldValueParser(field) let parsed = parser.parseListFieldValue() print(parsed) // [ // .item(Item(bareItem: .token("Sec-CH-Example"), parameters: [])), // .item(Item(bareItem: .token("Sec-CH-Example-2"), parameters: [])), // ] var serializer = StructuredFieldValueSerializer() let serialized = serializer.writeListFieldValue(parsed) ``` Notice the substantially more verbose types involved in this operation. These types are highly generic, giving the opportunity for parsing and serializing that greatly reduces the runtime overhead. They also make it easier to distinguish between tokens and strings, and to observe the order of objects in dictionaries or parameters, which can be lost at the Codable level. In general, users should consider this API only when they are confident they need either the flexibility or the performance. This may be valuable for header fields that do not evolve often, or that are highly dynamic. ## Topics ### Representing Structured Field Values - ``InnerList`` - ``BareInnerList`` - ``Item`` - ``BareItem`` - ``ItemOrInnerList`` ### Helper Types - ``OrderedMap`` - ``PseudoDecimal`` ### Parsing and Serializing - ``StructuredFieldValueParser`` - ``StructuredFieldValueSerializer`` ### Errors - ``StructuredHeaderError`` ================================================ FILE: Sources/RawStructuredFieldValues/Errors.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// // MARK: - StructuredHeaderError /// Errors that may be encountered when working with structured headers. public struct StructuredHeaderError: Error, Sendable { private enum _BaseError: Hashable { case invalidTrailingBytes case invalidInnerList case invalidItem case invalidKey case invalidIntegerOrDecimal case invalidString case invalidByteSequence case invalidBoolean case invalidToken case invalidDate case invalidDisplayString case invalidList case invalidDictionary case missingKey case invalidTypeForItem case integerOutOfRange case indexOutOfRange } private var base: _BaseError private init(_ base: _BaseError) { self.base = base } } extension StructuredHeaderError { public static let invalidTrailingBytes = StructuredHeaderError(.invalidTrailingBytes) public static let invalidInnerList = StructuredHeaderError(.invalidInnerList) public static let invalidItem = StructuredHeaderError(.invalidItem) public static let invalidKey = StructuredHeaderError(.invalidKey) public static let invalidIntegerOrDecimal = StructuredHeaderError(.invalidIntegerOrDecimal) public static let invalidString = StructuredHeaderError(.invalidString) public static let invalidByteSequence = StructuredHeaderError(.invalidByteSequence) public static let invalidBoolean = StructuredHeaderError(.invalidBoolean) public static let invalidToken = StructuredHeaderError(.invalidToken) public static let invalidDate = StructuredHeaderError(.invalidDate) public static let invalidDisplayString = StructuredHeaderError(.invalidDisplayString) public static let invalidList = StructuredHeaderError(.invalidList) public static let invalidDictionary = StructuredHeaderError(.invalidDictionary) public static let missingKey = StructuredHeaderError(.missingKey) public static let invalidTypeForItem = StructuredHeaderError(.invalidTypeForItem) public static let integerOutOfRange = StructuredHeaderError(.integerOutOfRange) public static let indexOutOfRange = StructuredHeaderError(.indexOutOfRange) } extension StructuredHeaderError: Hashable {} extension StructuredHeaderError: CustomStringConvertible { public var description: String { String(describing: self.base) } } ================================================ FILE: Sources/RawStructuredFieldValues/FieldParser.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// A `StructuredFieldValueParser` is the basic parsing object for structured header field values. public struct StructuredFieldValueParser where BaseData.Element == UInt8 { // Right now I'm on the fence about whether this should be generic. It's convenient, // and makes it really easy for us to express the parsing over a wide range of data types. // But it risks code size in a really nasty way! We should validate that we don't pay too // much for this flexibility. private var underlyingData: BaseData.SubSequence public init(_ data: BaseData) { self.underlyingData = data[...] } } extension StructuredFieldValueParser: Sendable where BaseData: Sendable, BaseData.SubSequence: Sendable {} extension StructuredFieldValueParser { // Helper typealiases to avoid the explosion of generic parameters @available(*, deprecated, renamed: "RFC9651BareItem") public typealias BareItem = RawStructuredFieldValues.BareItem public typealias RFC9651BareItem = RawStructuredFieldValues.RFC9651BareItem public typealias Item = RawStructuredFieldValues.Item public typealias BareInnerList = RawStructuredFieldValues.BareInnerList public typealias InnerList = RawStructuredFieldValues.InnerList public typealias ItemOrInnerList = RawStructuredFieldValues.ItemOrInnerList public typealias Key = String /// Parse the HTTP structured field value as a list. /// /// This is a straightforward implementation of the parser in the spec. /// /// - throws: If the field value could not be parsed. /// - returns: An array of items or inner lists. public mutating func parseListFieldValue() throws -> [ItemOrInnerList] { // Step one, strip leading spaces. self.underlyingData.stripLeadingSpaces() // Step 2, enter the core list parsing loop. let members = try self._parseAList() // Final step, strip trailing spaces (which are now leading spaces, natch). self.underlyingData.stripLeadingSpaces() // The data is _required_ to be empty now, if it isn't we fail. guard self.underlyingData.count == 0 else { throw StructuredHeaderError.invalidTrailingBytes } return members } /// Parse the HTTP structured header field value as a dictionary. /// /// - throws: If the field value could not be parsed. /// - returns: An ``OrderedMap`` corresponding to the entries in the dictionary. public mutating func parseDictionaryFieldValue() throws -> OrderedMap { // Step one, strip leading spaces. self.underlyingData.stripLeadingSpaces() // Step 2, enter the core dictionary parsing loop. let map = try self._parseADictionary() // Final step, strip trailing spaces (which are now leading spaces, natch). self.underlyingData.stripLeadingSpaces() // The data is _required_ to be empty now, if it isn't we fail. guard self.underlyingData.count == 0 else { throw StructuredHeaderError.invalidTrailingBytes } return map } /// Parse the HTTP structured header field value as an item. /// /// - throws: If the field value could not be parsed. /// - returns: The ``Item`` in the field. public mutating func parseItemFieldValue() throws -> Item { // Step one, strip leading spaces. self.underlyingData.stripLeadingSpaces() // Step 2, do the core parse. let item = try self._parseAnItem() // Final step, strip trailing spaces (which are now leading spaces, natch). self.underlyingData.stripLeadingSpaces() // The data is _required_ to be empty now, if it isn't we fail. guard self.underlyingData.count == 0 else { throw StructuredHeaderError.invalidTrailingBytes } return item } private mutating func _parseAList() throws -> [ItemOrInnerList] { var results: [ItemOrInnerList] = [] loop: while self.underlyingData.count > 0 { results.append(try self._parseAnItemOrInnerList()) self.underlyingData.stripLeadingOWS() // If we've consumed all the data, the parse is finished. guard let next = self.underlyingData.popFirst() else { break loop } // Otherwise, the next character needs to be a comma. guard next == asciiComma else { throw StructuredHeaderError.invalidList } self.underlyingData.stripLeadingOWS() guard self.underlyingData.count > 0 else { // Trailing comma! throw StructuredHeaderError.invalidList } } return results } private mutating func _parseADictionary() throws -> OrderedMap { var results = OrderedMap() loop: while self.underlyingData.count > 0 { let key = try self._parseAKey() if self.underlyingData.first == asciiEqual { self.underlyingData.consumeFirst() results[key] = try self._parseAnItemOrInnerList() } else { results[key] = .item(Item(bareItem: true, parameters: try self._parseParameters())) } self.underlyingData.stripLeadingOWS() /// If we've consumed all the data, the parse is finished. guard let next = self.underlyingData.popFirst() else { break loop } guard next == asciiComma else { throw StructuredHeaderError.invalidDictionary } self.underlyingData.stripLeadingOWS() guard self.underlyingData.count > 0 else { // Trailing comma! throw StructuredHeaderError.invalidList } } return results } private mutating func _parseAnItemOrInnerList() throws -> ItemOrInnerList { if self.underlyingData.first == asciiOpenParenthesis { return .innerList(try self._parseAnInnerList()) } else { return .item(try self._parseAnItem()) } } private mutating func _parseAnInnerList() throws -> InnerList { precondition(self.underlyingData.popFirst() == asciiOpenParenthesis) var innerList = BareInnerList() while self.underlyingData.count > 0 { self.underlyingData.stripLeadingSpaces() if self.underlyingData.first == asciiCloseParenthesis { // Consume, parse parameters, and complete. self.underlyingData.consumeFirst() let parameters = try self._parseParameters() return InnerList(bareInnerList: innerList, parameters: parameters) } innerList.append(try self._parseAnItem()) let nextChar = self.underlyingData.first guard nextChar == asciiSpace || nextChar == asciiCloseParenthesis else { throw StructuredHeaderError.invalidInnerList } } // If we got here, we never got the close character for the list. Not good! This is an error. throw StructuredHeaderError.invalidInnerList } private mutating func _parseAnItem() throws -> Item { let bareItem = try _parseABareItem() let parameters = try self._parseParameters() return Item(bareItem: bareItem, parameters: parameters) } private mutating func _parseABareItem() throws -> RFC9651BareItem { guard let first = self.underlyingData.first else { throw StructuredHeaderError.invalidItem } switch first { case asciiDash, asciiDigits: return try self._parseAnIntegerOrDecimal(isDate: false) case asciiDquote: return try self._parseAString() case asciiColon: return try self._parseAByteSequence() case asciiQuestionMark: return try self._parseABoolean() case asciiCapitals, asciiLowercases, asciiAsterisk: return try self._parseAToken() case asciiAt: return try self._parseADate() case asciiPercent: return try self._parseADisplayString() default: throw StructuredHeaderError.invalidItem } } private mutating func _parseAnIntegerOrDecimal(isDate: Bool) throws -> RFC9651BareItem { var sign = Int64(1) var type = IntegerOrDecimal.integer if let first = self.underlyingData.first, first == asciiDash { sign = -1 self.underlyingData.consumeFirst() } guard let first = self.underlyingData.first, asciiDigits.contains(first) else { throw StructuredHeaderError.invalidIntegerOrDecimal } var index = self.underlyingData.startIndex let endIndex = self.underlyingData.endIndex loop: while index < endIndex { switch self.underlyingData[index] { case asciiDigits: // Do nothing () case asciiPeriod where type == .integer: // If output_date is decimal, fail parsing. if isDate { throw StructuredHeaderError.invalidDate } // If input_number contains more than 12 characters, fail parsing. Otherwise, // set type to decimal and consume. if self.underlyingData.distance(from: self.underlyingData.startIndex, to: index) > 12 { if isDate { throw StructuredHeaderError.invalidDate } else { throw StructuredHeaderError.invalidIntegerOrDecimal } } type = .decimal default: // Non period or number, we're done parsing. break loop } // "Consume" the character by advancing. self.underlyingData.formIndex(after: &index) // If type is integer and the input contains more than 15 characters, or type is decimal and more than 16, // fail parsing. let count = self.underlyingData.distance(from: self.underlyingData.startIndex, to: index) switch type { case .integer: if count > 15 { if isDate { throw StructuredHeaderError.invalidDate } else { throw StructuredHeaderError.invalidIntegerOrDecimal } } case .decimal: assert(isDate == false) if count > 16 { throw StructuredHeaderError.invalidIntegerOrDecimal } } } // Consume the string. let integerBytes = self.underlyingData[.. 4 { // Period may not be last, or have more than three characters after it. throw StructuredHeaderError.invalidIntegerOrDecimal } // Same notes here as above var decimal = PseudoDecimal(bytes: integerBytes) decimal.mantissa *= Int64(sign) return .decimal(decimal) } } private mutating func _parseAString() throws -> RFC9651BareItem { assert(self.underlyingData.first == asciiDquote) self.underlyingData.consumeFirst() // Ok, let's pause. Here we need to parse out a String and turn it into...well, into something. // It doesn't have to be a String now, but at some stage a user is going to want it to be a String, // so we need to include the idea that we'll have to manifest a String at some point. // // The wrinkle here is we have to deal with escapes. Two characters may appear escaped in strings: // dquote and backslash. Worse, _only_ those two may appear escaped: any other escape sequence is invalid. // This means the most naive algorithm, which also happens to be best for the cache and branch predictor // (just treat a string as a byte slice, walk forward until we find dquote, and slice it out) doesn't work. // // We can choose to do this _anyway_, by searching for the first unescaped dquote. But we have to remember // to handle the escaping at some point, and we also have to police character validity. Doing this later risks // that we'll have evicted these bytes from cache, forcing a cache miss to get them back. Not ideal. // // So we do a different thing. We walk the string twice: first to validate and find its length, and then the // second time to actually create the String. We can't do this in one step without risking gravely over-allocating // for the String, which would be sad, so we tolerate doing it twice. While we do it, we record whether the string // contains escapes. If it doesn't, we know that we can fall back to the optimised String construction with no branches, // making this fairly quick. If it does, well, we have branchy awkward code, but at least we have confidence that our // data is in cache. // First, walk 1: find the length, validate as we go, check for escapes. var escapes = 0 var index = self.underlyingData.startIndex var endIndex = self.underlyingData.endIndex loop: while index < endIndex { let char = self.underlyingData[index] switch char { case asciiBackslash: self.underlyingData.formIndex(after: &index) if index == endIndex { throw StructuredHeaderError.invalidString } let next = self.underlyingData[index] guard next == asciiDquote || next == asciiBackslash else { throw StructuredHeaderError.invalidString } escapes += 1 case asciiDquote: // Unquoted dquote, this is the end of the string. endIndex = index break loop case 0x00...0x1F, 0x7F...: // Forbidden bytes in string: string must be VCHAR and SP. throw StructuredHeaderError.invalidString default: // Allowed, unescape, uncontrol byte. () } self.underlyingData.formIndex(after: &index) } // Oops, fell off the back of the string. if endIndex == self.underlyingData.endIndex { throw StructuredHeaderError.invalidString } let stringSlice = self.underlyingData[self.underlyingData.startIndex.. RFC9651BareItem { assert(self.underlyingData.first == asciiColon) self.underlyingData.consumeFirst() var index = self.underlyingData.startIndex while index < self.underlyingData.endIndex { switch self.underlyingData[index] { case asciiColon: // Hey, this is the end! The base64 data is the data prior to here. let consumedSlice = self.underlyingData[.. RFC9651BareItem { assert(self.underlyingData.first == asciiQuestionMark) self.underlyingData.consumeFirst() switch self.underlyingData.first { case asciiOne: self.underlyingData.consumeFirst() return true case asciiZero: self.underlyingData.consumeFirst() return false default: // Whoops! throw StructuredHeaderError.invalidBoolean } } private mutating func _parseAToken() throws -> RFC9651BareItem { assert( asciiCapitals.contains(self.underlyingData.first!) || asciiLowercases.contains(self.underlyingData.first!) || self.underlyingData.first! == asciiAsterisk ) var index = self.underlyingData.startIndex loop: while index < self.underlyingData.endIndex { switch self.underlyingData[index] { // Valid token characters are RFC 7230 tchar, colon, and slash. // tchar is: // // tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" // / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" // / DIGIT / ALPHA // // The following unfortunate case statement covers this. Tokens; not even once. case asciiExclamationMark, asciiOctothorpe, asciiDollar, asciiPercent, asciiAmpersand, asciiSquote, asciiAsterisk, asciiPlus, asciiDash, asciiPeriod, asciiCaret, asciiUnderscore, asciiBacktick, asciiPipe, asciiTilde, asciiDigits, asciiCapitals, asciiLowercases, asciiColon, asciiSlash: // Good, consume self.underlyingData.formIndex(after: &index) default: // Token complete break loop } } // Token is complete either when we stop getting valid token characters or when // we get to the end of the string. let tokenSlice = self.underlyingData[.. RFC9651BareItem { assert(self.underlyingData.first == asciiAt) self.underlyingData.consumeFirst() return try self._parseAnIntegerOrDecimal(isDate: true) } private mutating func _parseADisplayString() throws -> RFC9651BareItem { assert(self.underlyingData.first == asciiPercent) self.underlyingData.consumeFirst() guard self.underlyingData.first == asciiDquote else { throw StructuredHeaderError.invalidDisplayString } self.underlyingData.consumeFirst() var byteArray = [UInt8]() while let char = self.underlyingData.first { self.underlyingData.consumeFirst() switch char { case 0x00...0x1F, 0x7F...: throw StructuredHeaderError.invalidDisplayString case asciiPercent: if self.underlyingData.count < 2 { throw StructuredHeaderError.invalidDisplayString } let octetHex = EncodedHex(self.underlyingData.prefix(2)) self.underlyingData = self.underlyingData.dropFirst(2) guard let octet = octetHex.decode() else { throw StructuredHeaderError.invalidDisplayString } byteArray.append(octet) case asciiDquote: if #available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *) { let unicodeSequence = String(validating: byteArray, as: UTF8.self) guard let unicodeSequence else { throw StructuredHeaderError.invalidDisplayString } return .displayString(unicodeSequence) } else { return try _decodeDisplayString(byteArray: &byteArray) } default: byteArray.append(char) } } // Fail parsing — reached the end of the string without finding a closing DQUOTE. throw StructuredHeaderError.invalidDisplayString } /// This method is called in environments where `String(validating:as:)` is unavailable. It uses /// `String(validatingUTF8:)` which requires `byteArray` to be null terminated. `String(validating:as:)` /// does not require that requirement. Therefore, it does not perform null checks, which makes it more optimal. private func _decodeDisplayString(byteArray: inout [UInt8]) throws -> RFC9651BareItem { // String(validatingUTF8:) requires byteArray to be null-terminated. byteArray.append(0) let unicodeSequence = byteArray.withUnsafeBytes { $0.withMemoryRebound(to: CChar.self) { // This force-unwrap is safe, as the buffer must successfully bind to CChar. String(validatingCString: $0.baseAddress!) } } guard let unicodeSequence else { throw StructuredHeaderError.invalidDisplayString } return .displayString(unicodeSequence) } private mutating func _parseParameters() throws -> OrderedMap { var parameters = OrderedMap() // We want to loop while we still have bytes _and_ while the first character is asciiSemicolon. // This covers both. while self.underlyingData.first == asciiSemicolon { // Consume the colon self.underlyingData.consumeFirst() self.underlyingData.stripLeadingSpaces() let paramName = try self._parseAKey() var paramValue: RFC9651BareItem = true if self.underlyingData.first == asciiEqual { self.underlyingData.consumeFirst() paramValue = try self._parseABareItem() } parameters[paramName] = paramValue } return parameters } private mutating func _parseAKey() throws -> Key { guard let first = self.underlyingData.first, asciiLowercases.contains(first) || first == asciiAsterisk else { throw StructuredHeaderError.invalidKey } let key = self.underlyingData.prefix(while: { switch $0 { case asciiLowercases, asciiDigits, asciiUnderscore, asciiDash, asciiPeriod, asciiAsterisk: return true default: return false } }) self.underlyingData = self.underlyingData.dropFirst(key.count) return String(decoding: key, as: UTF8.self) } } private enum IntegerOrDecimal { case integer case decimal } extension RandomAccessCollection where Element == UInt8, SubSequence == Self { mutating func stripLeadingSpaces() { self = self.drop(while: { $0 == asciiSpace }) } mutating func stripLeadingOWS() { self = self.drop(while: { $0 == asciiSpace || $0 == asciiTab }) } mutating func consumeFirst() { self = self.dropFirst() } } extension String { // This is the slow path, so we never inline this. @inline(never) fileprivate static func decodingEscapes(_ bytes: Bytes, escapes: Int) -> String where Bytes.Element == UInt8 { // We assume the string is previously validated, so the escapes are easily removed. See the doc comment for // `StrippingStringEscapesCollection` for more details on what we're doing here. let unescapedBytes = StrippingStringEscapesCollection(bytes, escapes: escapes) if #available(macOS 10.16, macCatalyst 14.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) { return String(unsafeUninitializedCapacity: unescapedBytes.count) { innerPtr in let (_, endIndex) = innerPtr.initialize(from: unescapedBytes) return endIndex } } else { return String(decoding: unescapedBytes, as: UTF8.self) } } } /// This helper struct is used to try to minimise the surface area of the unsafe string constructor. /// /// We have a goal to create the String as cheaply as possible in the presence of escapes. Using the safe constructor will not /// do that: if a non-contiguous collection is used to create a String directly, an intermediate Array will be used to flatten /// the collection. As an escaped string is definitionally non-contiguous, we would hit that path, which is very sad. /// Until this issue is fixed (https://bugs.swift.org/browse/SR-13111) we take a different approach: we use /// `String.init(unsafeUninitializedCapacity:initializingWith)`. This is an unsafe function, so to reduce the unsafety as much /// as possible we define this safe wrapping Collection and then use `copyBytes` to implement the initialization. private struct StrippingStringEscapesCollection where BaseCollection.Element == UInt8 { private var base: BaseCollection private var escapes: UInt init(_ base: BaseCollection, escapes: Int) { self.base = base self.escapes = UInt(escapes) } } extension StrippingStringEscapesCollection: Collection { fileprivate struct Index { fileprivate var _baseIndex: BaseCollection.Index fileprivate init(baseIndex: BaseCollection.Index) { self._baseIndex = baseIndex } } // This is an extremely important customisation point! Our base collection is random access, // so we know that on the base this is O(1), but as this collection is _not_ random access here // it's O(n). fileprivate var count: Int { self.base.count - Int(self.escapes) } fileprivate var startIndex: Index { // Tricky note here, but start index _might_ be an ascii backslash, which we have to skip. Index(baseIndex: self.unescapedIndex(self.base.startIndex)) } fileprivate var endIndex: Index { Index(baseIndex: self.base.endIndex) } fileprivate func index(after i: Index) -> Index { let next = self.base.index(after: i._baseIndex) return Index(baseIndex: self.unescapedIndex(next)) } fileprivate subscript(index: Index) -> UInt8 { self.base[index._baseIndex] } private func unescapedIndex(_ baseIndex: BaseCollection.Index) -> BaseCollection.Index { if baseIndex == self.base.endIndex { return baseIndex } if self.base[baseIndex] == asciiBackslash { return self.base.index(after: baseIndex) } else { return baseIndex } } } extension StrippingStringEscapesCollection.Index: Equatable {} extension StrippingStringEscapesCollection.Index: Comparable { fileprivate static func < (lhs: Self, rhs: Self) -> Bool { lhs._baseIndex < rhs._baseIndex } } /// `EncodedHex` represents a (possibly invalid) hex value in UTF8. struct EncodedHex { private(set) var firstChar: UInt8 private(set) var secondChar: UInt8 init(_ bytes: Bytes) where Bytes.Element == UInt8 { precondition(bytes.count == 2) self.firstChar = bytes[bytes.startIndex] self.secondChar = bytes[bytes.index(after: bytes.startIndex)] } /// Validates and converts `EncodedHex` to a base 10 UInt8. /// /// If `EncodedHex` does not represent a valid hex value, the result of this method is nil. fileprivate func decode() -> UInt8? { guard let firstCharAsInteger = self.htoi(self.firstChar), let secondCharAsInteger = self.htoi(self.secondChar) else { return nil } return (firstCharAsInteger << 4) + secondCharAsInteger } /// Converts a hex character given in UTF8 to its integer value. private func htoi(_ asciiChar: UInt8) -> UInt8? { switch asciiChar { case asciiZero...asciiNine: return asciiChar - asciiZero case asciiLowerA...asciiLowerF: return asciiChar - asciiLowerA + 10 default: return nil } } } ================================================ FILE: Sources/RawStructuredFieldValues/FieldSerializer.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// private let validIntegerRange = Int64(-999_999_999_999_999)...Int64(999_999_999_999_999) /// A `StructuredFieldValueSerializer` is the basic parsing object for structured header field values. public struct StructuredFieldValueSerializer: Sendable { private var data: [UInt8] public init() { self.data = [] } } extension StructuredFieldValueSerializer { /// Writes a structured dictionary header field value. /// /// - parameters: /// - root: The dictionary object. /// - throws: If the dictionary could not be serialized. /// - returns: The bytes of the serialized header field value. public mutating func writeDictionaryFieldValue(_ root: OrderedMap) throws -> [UInt8] { guard root.count > 0 else { return [] } defer { self.data.removeAll(keepingCapacity: true) } try self.serializeADictionary(root) return self.data } /// Writes a structured list header field value. /// /// - parameters: /// - list: The list object. /// - throws: If the list could not be serialized. /// - returns: The bytes of the serialized header field value. public mutating func writeListFieldValue(_ list: [ItemOrInnerList]) throws -> [UInt8] { guard list.count > 0 else { return [] } defer { self.data.removeAll(keepingCapacity: true) } try self.serializeAList(list) return self.data } /// Writes a structured item header field value. /// /// - parameters: /// - item: The item. /// - throws: If the item could not be serialized. /// - returns: The bytes of the serialized header field value. public mutating func writeItemFieldValue(_ item: Item) throws -> [UInt8] { defer { self.data.removeAll(keepingCapacity: true) } try self.serializeAnItem(item) return self.data } } extension StructuredFieldValueSerializer { private mutating func serializeADictionary(_ dictionary: OrderedMap) throws { for (name, value) in dictionary { try self.serializeAKey(name) if case .item(let item) = value, case .bool(true) = item.rfc9651BareItem { try self.serializeParameters(item.rfc9651Parameters) } else { self.data.append(asciiEqual) switch value { case .innerList(let inner): try self.serializeAnInnerList(inner) case .item(let item): try self.serializeAnItem(item) } } self.data.append(asciiComma) self.data.append(asciiSpace) } self.data.removeLast(2) } private mutating func serializeAList(_ list: [ItemOrInnerList]) throws { for element in list.dropLast() { switch element { case .innerList(let innerList): try self.serializeAnInnerList(innerList) case .item(let item): try self.serializeAnItem(item) } self.data.append(asciiComma) self.data.append(asciiSpace) } if let last = list.last { switch last { case .innerList(let innerList): try self.serializeAnInnerList(innerList) case .item(let item): try self.serializeAnItem(item) } } } private mutating func serializeAnInnerList(_ innerList: InnerList) throws { self.data.append(asciiOpenParenthesis) for item in innerList.bareInnerList.dropLast() { try self.serializeAnItem(item) self.data.append(asciiSpace) } if let last = innerList.bareInnerList.last { try self.serializeAnItem(last) } self.data.append(asciiCloseParenthesis) try self.serializeParameters(innerList.rfc9651Parameters) } private mutating func serializeAnItem(_ item: Item) throws { try self.serializeABareItem(item.rfc9651BareItem) try self.serializeParameters(item.rfc9651Parameters) } private mutating func serializeParameters(_ parameters: OrderedMap) throws { for (key, value) in parameters { self.data.append(asciiSemicolon) try self.serializeAKey(key) if case .bool(true) = value { // Don't serialize boolean true continue } self.data.append(asciiEqual) try self.serializeABareItem(value) } } private mutating func serializeAKey(_ key: String) throws { // We touch each byte twice here, but that's ok: this is cache friendly and less branchy (the copy gets to be memcpy in some cases!) try key.validateStructuredHeaderKey() self.data.append(contentsOf: key.utf8) } private mutating func serializeABareItem(_ item: RFC9651BareItem) throws { switch item { case .integer(let int): guard let wideInt = Int64(exactly: int), validIntegerRange.contains(wideInt) else { throw StructuredHeaderError.invalidIntegerOrDecimal } self.data.append(contentsOf: String(int, radix: 10).utf8) case .decimal(let decimal): self.data.append(contentsOf: String(decimal).utf8) case .string(let string): let bytes = string.utf8 guard bytes.allSatisfy({ !(0x00...0x1F).contains($0) && $0 != 0x7F && $0 < 0x80 }) else { throw StructuredHeaderError.invalidString } self.data.append(asciiDquote) for byte in bytes { if byte == asciiBackslash || byte == asciiDquote { self.data.append(asciiBackslash) } self.data.append(byte) } self.data.append(asciiDquote) case .token(let token): guard token.structuredHeadersIsValidToken else { throw StructuredHeaderError.invalidToken } self.data.append(contentsOf: token.utf8) case .undecodedByteSequence(let bytes): // We require the user to have gotten this right. self.data.append(asciiColon) self.data.append(contentsOf: bytes.utf8) self.data.append(asciiColon) case .bool(let bool): self.data.append(asciiQuestionMark) let character = bool ? asciiOne : asciiZero self.data.append(character) case .date(let date): self.data.append(asciiAt) // Then, serialize as integer. guard let wideInt = Int64(exactly: date), validIntegerRange.contains(wideInt) else { throw StructuredHeaderError.invalidDate } self.data.append(contentsOf: String(date, radix: 10).utf8) case .displayString(let displayString): let bytes = displayString.utf8 self.data.append(asciiPercent) self.data.append(asciiDquote) for byte in bytes { if byte == asciiPercent || byte == asciiDquote || (0x00...0x1F).contains(byte) || (0x7F...).contains(byte) { self.data.append(asciiPercent) let encodedByte = UInt8.encodeToHex(byte) self.data.append(encodedByte.firstChar) self.data.append(encodedByte.secondChar) } else { self.data.append(byte) } } self.data.append(asciiDquote) } } } extension String { func validateStructuredHeaderKey() throws { let utf8View = self.utf8 if let firstByte = utf8View.first { switch firstByte { case asciiLowercases, asciiAsterisk: // Good () default: throw StructuredHeaderError.invalidKey } } let validKey = utf8View.dropFirst().allSatisfy { switch $0 { case asciiLowercases, asciiDigits, asciiUnderscore, asciiDash, asciiPeriod, asciiAsterisk: return true default: return false } } guard validKey else { throw StructuredHeaderError.invalidKey } } } extension UInt8 { /// Converts an integer in base 10 to hex of type `EncodedHex`. fileprivate static func encodeToHex(_ int: Self) -> EncodedHex { let firstChar = self.itoh(int >> 4) let secondChar = self.itoh(int & 0x0F) return EncodedHex([firstChar, secondChar]) } /// Converts an integer to its hex character in UTF8. private static func itoh(_ int: Self) -> Self { (int > 9) ? (asciiLowerA + int - 10) : (asciiZero + int) } } ================================================ FILE: Sources/RawStructuredFieldValues/OrderedMap.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// `OrderedMap` is a data type that has associative-array properties, but that /// maintains insertion order. /// /// Our initial implementation takes advantage of the fact that the vast majority of /// maps in structured headers are small (fewer than 20 elements), and so the /// distinction between hashing and linear search is not really a concern. However, for /// future implementation flexibility, we continue to require that keys be hashable. /// /// Note that this preserves _original_ insertion order: if you overwrite a key's value, the /// key does not move to "last". This is a specific requirement for Structured Headers and may /// harm the generality of this implementation. public struct OrderedMap where Key: Hashable { private var backing: [Entry] public init() { self.backing = [] } /// Look up the value for a given key. /// /// Warning! Unlike a regular dictionary, we do not promise this will be O(1)! public subscript(key: Key) -> Value? { get { self.backing.first(where: { $0.key == key }).map { $0.value } } set { if let existing = self.backing.firstIndex(where: { $0.key == key }) { if let newValue = newValue { self.backing[existing] = Entry(key: key, value: newValue) } else { self.backing.remove(at: existing) } } else if let newValue = newValue { self.backing.append(Entry(key: key, value: newValue)) } } } func mapValues(_ body: (Value) throws -> NewValue) rethrows -> OrderedMap { var returnValue = OrderedMap() returnValue.backing = try self.backing.map { try .init(key: $0.key, value: body($0.value)) } return returnValue } } // MARK: - Helper struct for storing elements extension OrderedMap { // This struct takes some explaining. // // We don't want to maintain too much code here. In particular, we'd like to have straightforward equatable and hashable // implementations. However, tuples aren't equatable or hashable. So we need to actually store something that is: a nominal // type. That's this! // // This existence of this struct is a pure implementation detail and not exposed to the user of the type. fileprivate struct Entry { var key: Key var value: Value } } extension OrderedMap: Sendable where Key: Sendable, Value: Sendable {} extension OrderedMap.Entry: Sendable where Key: Sendable, Value: Sendable {} // MARK: - Collection conformances extension OrderedMap: RandomAccessCollection, MutableCollection { public struct Index: Sendable { fileprivate var baseIndex: Array<(Key, Value)>.Index fileprivate init(_ baseIndex: Array<(Key, Value)>.Index) { self.baseIndex = baseIndex } } public var startIndex: Index { Index(self.backing.startIndex) } public var endIndex: Index { Index(self.backing.endIndex) } public var count: Int { self.backing.count } public subscript(position: Index) -> (Key, Value) { get { let element = self.backing[position.baseIndex] return (element.key, element.value) } set { self.backing[position.baseIndex] = Entry(key: newValue.0, value: newValue.1) } } public func index(_ i: Index, offsetBy distance: Int) -> Index { Index(self.backing.index(i.baseIndex, offsetBy: distance)) } public func index(after i: Index) -> Index { self.index(i, offsetBy: 1) } public func index(before i: Index) -> Index { self.index(i, offsetBy: -1) } } extension OrderedMap.Index: Hashable {} extension OrderedMap.Index: Comparable { public static func < (lhs: Self, rhs: Self) -> Bool { lhs.baseIndex < rhs.baseIndex } } extension OrderedMap.Index: Strideable { public func advanced(by n: Int) -> Self { Self(self.baseIndex.advanced(by: n)) } public func distance(to other: Self) -> Int { self.baseIndex.distance(to: other.baseIndex) } } // MARK: - Helper conformances extension OrderedMap: ExpressibleByDictionaryLiteral { public init(dictionaryLiteral elements: (Key, Value)...) { self.backing = elements.map { Entry(key: $0.0, value: $0.1) } } } extension OrderedMap: CustomDebugStringConvertible { public var debugDescription: String { let backingRepresentation = self.backing.map { "\($0.key): \($0.value)" }.joined(separator: ", ") return "[\(backingRepresentation)]" } } // MARK: - Conditional conformances extension OrderedMap.Entry: Equatable where Value: Equatable {} extension OrderedMap: Equatable where Value: Equatable {} extension OrderedMap.Entry: Hashable where Value: Hashable {} extension OrderedMap: Hashable where Value: Hashable {} ================================================ FILE: Sources/RawStructuredFieldValues/PseudoDecimal.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// #if canImport(Darwin) import Darwin #elseif canImport(Glibc) import Glibc #elseif canImport(Musl) import Musl #elseif canImport(Android) import Android #elseif canImport(WinSDK) import WinSDK #else #error("Unsupported OS") #endif /// A pseudo-representation of a decimal number. /// /// The goal of this type is to remove a dependency on Foundation. As Structured Headers require only a very simple /// conception of a decimal, there is no need to bring in the entire Foundation dependency: it's sufficient to define /// a trivial type to represent the _idea_ of a decimal number. We don't have any requirement to do math on this type: /// we just need to be able to use the type to store the fixed point representation of the value. /// /// For ease of conversion to _actual_ decimal types, we use a mantissa/exponent/sign representation much like other /// types would. Note that this is a base 10 exponent, not a base 2 exponent: the exponent multiplies by 10, not 2. We also /// encode the sign bit implicitly in the sign bit of the mantissa. /// /// The range of this type is from -999,999,999,999.999 to 999,999,999,999.999. This means the maximum value of the significand /// is 999,999,999,999,999. The exponent ranges from -3 to 0. Additionally, there may be no more than 12 decimal digits before /// the decimal place, so while the maximum value of the significand is 999,999,999,999,999, that is only acceptable if the /// exponent is -3. public struct PseudoDecimal: Hashable, Sendable { private var _mantissa: Int64 private var _exponent: Int8 public var mantissa: Int64 { get { self._mantissa } set { Self.fatalValidate(mantissa: newValue, exponent: self._exponent) self._mantissa = newValue } } public var exponent: Int8 { get { self._exponent } set { Self.fatalValidate(mantissa: self._mantissa, exponent: newValue) self._exponent = newValue } } public init(mantissa: Int, exponent: Int) { self._mantissa = Int64(mantissa) self._exponent = Int8(exponent) Self.fatalValidate(mantissa: self._mantissa, exponent: self._exponent) } internal init(bytes: Bytes) where Bytes.Element == UInt8 { let elements = bytes.split(separator: asciiPeriod, maxSplits: 1) // Precondition is safe, this can only be called from the parser which has already validated the formatting. precondition(elements.count == 2) var nonSignBytes = bytes.count var sign = Int64(1) if bytes.first == asciiDash { sign = -1 nonSignBytes &-= 1 } var mantissa = Int64(0) var periodOffset = 0 for (offset, element) in bytes.enumerated() { if element == asciiPeriod { periodOffset = offset continue } let integerValue = element - asciiZero assert(integerValue < 10 && integerValue >= 0) mantissa *= 10 mantissa += Int64(integerValue) } self._mantissa = mantissa * sign // Check where the period was in relation to the rest of the string. We can have anywhere between // 1 and 3 digits after the period. Note that if the period was last, offset == nonSignBytes - 1, so // the actual values here are 2 to 4. switch nonSignBytes - periodOffset { case 2: self._exponent = -1 case 3: self._exponent = -2 case 4: self._exponent = -3 default: preconditionFailure("Unexpected value of offset: have \(nonSignBytes) bytes and offset \(periodOffset)") } } private static func validate(mantissa: Int64, exponent: Int8) throws { // We compare against our upper and lower bounds. The maximum allowable magnitude of the mantissa is contingent // on the exponent. switch exponent { case 0 where mantissa.magnitude <= 999_999_999_999, -1 where mantissa.magnitude <= 9_999_999_999_999, -2 where mantissa.magnitude <= 99_999_999_999_999, -3 where mantissa.magnitude <= 999_999_999_999_999: // All acceptable () default: throw StructuredHeaderError.invalidIntegerOrDecimal } } private static func fatalValidate(mantissa: Int64, exponent: Int8) { do { try Self.validate(mantissa: mantissa, exponent: exponent) } catch { preconditionFailure( "Invalid value for structured header decimal: mantissa \(mantissa) exponent \(exponent)" ) } } fileprivate mutating func canonicalise() { // This cannonicalises the decimal into a standard format suitable for direct serialisation. // // Structured headers prefers decimals to be serialized with no leading or trailing zeros. Leading zeros // are easily avoided, but trailing zeros are a function of the exponent. As we must have at least one // digit after the decimal place, exponent zero is not suitable, so if that's our current exponent we // will arrange to have exponent -1. If the exponent is -1, we'll leave it alone. For -3 and -2 exponents // we'll try to cascade them down toward exponent -1 if we can divide the mantissa by 10 evenly, as that will // eliminate trailing zeros after the decimal place. switch self._exponent { case 0: self._mantissa *= 10 self._exponent = -1 case -3 where self._mantissa % 10 == 0: self._mantissa /= 10 self._exponent &+= 1 fallthrough case -2: if self._mantissa % 10 == 0 { self._mantissa /= 10 self._exponent &+= 1 } default: // These other cases don't require any work. () } } } extension PseudoDecimal: ExpressibleByFloatLiteral { public init(_ value: Double) throws { // This is kinda dumb, but it's basically good enough: we multiply by 1000 and then round that type // to an integer. var multiplied = value * 1000 multiplied.round(.toNearestOrEven) let mantissa = Int64(exactly: multiplied)! self._mantissa = mantissa self._exponent = -3 try Self.validate(mantissa: self._mantissa, exponent: self._exponent) } public init(floatLiteral value: Double) { do { try self.init(value) } catch { preconditionFailure("Invalid value for structured header decimal: \(value)") } } } extension String { public init(_ decimal: PseudoDecimal) { var local = decimal local.canonicalise() // First, serialize the mantissa. We do this with a magnitude because we add a sign later. var string = String(local.mantissa.magnitude, radix: 10) // Then, based on the exponent, we insert a period. Turns out the offset for // where we want to insert this character is exactly the exponent. // Before we do this, quick check: we may not even have that many digits! If we don't, // we need to pad with leading zeros until we do. let neededPadding = Int(local.exponent.magnitude) - string.count if neededPadding > 0 { string = String(repeating: "0", count: neededPadding) + string } let periodIndex = string.index(string.endIndex, offsetBy: Int(local.exponent)) let needLeadingZero = periodIndex == string.startIndex string.insert(".", at: periodIndex) // One check: did we insert the period at the front? If we did, add a leading zero. Note // that the above insert invalidated the indices so we must ask for the new start index. if needLeadingZero { string.insert("0", at: string.startIndex) } if local.mantissa < 0 { string.insert("-", at: string.startIndex) } self = string } } // Swift Numerics would let us do this for all the floating point types. extension Double { public init(_ pseudoDecimal: PseudoDecimal) { self = Double(pseudoDecimal.mantissa) * pow(10, Double(pseudoDecimal.exponent)) } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/BareInnerListDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct BareInnerListDecoder where BaseData.Element == UInt8 { private var list: BareInnerList private var currentOffset: Int private var decoder: _StructuredFieldDecoder init(_ list: BareInnerList, decoder: _StructuredFieldDecoder) { self.list = list self.currentOffset = 0 self.decoder = decoder } } extension BareInnerListDecoder: UnkeyedDecodingContainer { var codingPath: [CodingKey] { self.decoder.codingPath } var count: Int? { self.list.count } var isAtEnd: Bool { self.currentOffset == self.list.count } var currentIndex: Int { self.currentOffset } mutating func decodeNil() throws -> Bool { // We never decode nil. false } mutating func decode(_ type: T.Type) throws -> T where T: Decodable { // This is a request to decode a scalar. We decode the next entry and increment the index. guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } mutating func nestedContainer(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer where NestedKey: CodingKey { // This is a request to decode a full item. We decode the next entry and increment the index. guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } mutating func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer { guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } mutating func superDecoder() throws -> Decoder { // No inheritance here folks throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/BareItemDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct BareItemDecoder { private var item: RFC9651BareItem private var _codingPath: [_StructuredHeaderCodingKey] init(_ item: RFC9651BareItem, codingPath: [_StructuredHeaderCodingKey]) { self.item = item self._codingPath = codingPath } } extension BareItemDecoder: SingleValueDecodingContainer { var codingPath: [CodingKey] { self._codingPath as [CodingKey] } func decode(_ type: UInt8.Type) throws -> UInt8 { try self._decodeFixedWidthInteger(type) } func decode(_ type: Int8.Type) throws -> Int8 { try self._decodeFixedWidthInteger(type) } func decode(_ type: UInt16.Type) throws -> UInt16 { try self._decodeFixedWidthInteger(type) } func decode(_ type: Int16.Type) throws -> Int16 { try self._decodeFixedWidthInteger(type) } func decode(_ type: UInt32.Type) throws -> UInt32 { try self._decodeFixedWidthInteger(type) } func decode(_ type: Int32.Type) throws -> Int32 { try self._decodeFixedWidthInteger(type) } func decode(_ type: UInt64.Type) throws -> UInt64 { try self._decodeFixedWidthInteger(type) } func decode(_ type: Int64.Type) throws -> Int64 { try self._decodeFixedWidthInteger(type) } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func decode(_ type: UInt128.Type) throws -> UInt128 { try self._decodeFixedWidthInteger(type) } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func decode(_ type: Int128.Type) throws -> Int128 { try self._decodeFixedWidthInteger(type) } func decode(_ type: UInt.Type) throws -> UInt { try self._decodeFixedWidthInteger(type) } func decode(_ type: Int.Type) throws -> Int { try self._decodeFixedWidthInteger(type) } func decode(_ type: Float.Type) throws -> Float { try self._decodeBinaryFloatingPoint(type) } func decode(_ type: Double.Type) throws -> Double { try self._decodeBinaryFloatingPoint(type) } func decode(_: String.Type) throws -> String { switch self.item { case .string(let string): return string case .token(let token): return token default: throw StructuredHeaderError.invalidTypeForItem } } func decode(_: Bool.Type) throws -> Bool { guard case .bool(let bool) = self.item else { throw StructuredHeaderError.invalidTypeForItem } return bool } func decode(_: Data.Type) throws -> Data { guard case .undecodedByteSequence(let data) = self.item else { throw StructuredHeaderError.invalidTypeForItem } guard let decoded = Data(base64Encoded: data) else { throw StructuredHeaderError.invalidByteSequence } return decoded } func decode(_: Decimal.Type) throws -> Decimal { guard case .decimal(let pseudoDecimal) = self.item else { throw StructuredHeaderError.invalidTypeForItem } return Decimal( sign: pseudoDecimal.mantissa > 0 ? .plus : .minus, exponent: Int(pseudoDecimal.exponent), significand: Decimal(pseudoDecimal.mantissa.magnitude) ) } func decode(_: Date.Type) throws -> Date { guard case .date(let date) = self.item else { throw StructuredHeaderError.invalidTypeForItem } return Date(timeIntervalSince1970: Double(date)) } func decode(_: DisplayString.Type) throws -> DisplayString { guard case .displayString(let string) = self.item else { throw StructuredHeaderError.invalidTypeForItem } return DisplayString(rawValue: string) } func decodeNil() -> Bool { // Items are never nil. false } func decode(_ type: T.Type) throws -> T where T: Decodable { switch type { case is UInt8.Type: return try self.decode(UInt8.self) as! T case is Int8.Type: return try self.decode(Int8.self) as! T case is UInt16.Type: return try self.decode(UInt16.self) as! T case is Int16.Type: return try self.decode(Int16.self) as! T case is UInt32.Type: return try self.decode(UInt32.self) as! T case is Int32.Type: return try self.decode(Int32.self) as! T case is UInt64.Type: return try self.decode(UInt64.self) as! T case is Int64.Type: return try self.decode(Int64.self) as! T case is UInt.Type: return try self.decode(UInt.self) as! T case is Int.Type: return try self.decode(Int.self) as! T case is Float.Type: return try self.decode(Float.self) as! T case is Double.Type: return try self.decode(Double.self) as! T case is String.Type: return try self.decode(String.self) as! T case is Bool.Type: return try self.decode(Bool.self) as! T case is Data.Type: return try self.decode(Data.self) as! T case is Decimal.Type: return try self.decode(Decimal.self) as! T case is Date.Type: return try self.decode(Date.self) as! T case is DisplayString.Type: return try self.decode(DisplayString.self) as! T default: throw StructuredHeaderError.invalidTypeForItem } } private func _decodeBinaryFloatingPoint(_: T.Type) throws -> T { guard case .decimal(let decimal) = self.item else { throw StructuredHeaderError.invalidTypeForItem } // Going via Double is a bit sad. Swift Numerics would help here. return T(Double(decimal)) } private func _decodeFixedWidthInteger(_: T.Type) throws -> T { guard case .integer(let int) = self.item else { throw StructuredHeaderError.invalidTypeForItem } guard let result = T(exactly: int) else { throw StructuredHeaderError.integerOutOfRange } return result } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/DictionaryKeyedContainer.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct DictionaryKeyedContainer where BaseData.Element == UInt8 { private var dictionary: OrderedMap private var decoder: _StructuredFieldDecoder init(_ dictionary: OrderedMap, decoder: _StructuredFieldDecoder) { self.dictionary = dictionary self.decoder = decoder } } extension DictionaryKeyedContainer: KeyedDecodingContainerProtocol { var codingPath: [CodingKey] { self.decoder.codingPath } var allKeys: [Key] { self.dictionary.compactMap { Key(stringValue: $0.0) } } func contains(_ key: Key) -> Bool { self.dictionary.contains(where: { $0.0 == key.stringValue }) } func decodeNil(forKey key: Key) throws -> Bool { // We will decode nil if the key is not present. !self.contains(key) } func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } func nestedContainer( keyedBy type: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } func superDecoder() throws -> Decoder { // Dictionary headers never support inherited types. throw StructuredHeaderError.invalidTypeForItem } func superDecoder(forKey key: Key) throws -> Decoder { // Dictionary headers never support inherited types. throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/KeyedInnerListDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues private let keyedInnerListDecoderSupportedKeys = ["items", "parameters"] /// Used when someone has requested a keyed decoder for a property of inner list type. /// /// There are only two valid keys for this: "items" and "parameters". struct KeyedInnerListDecoder where BaseData.Element == UInt8 { private var innerList: InnerList private var decoder: _StructuredFieldDecoder init(_ innerList: InnerList, decoder: _StructuredFieldDecoder) { self.innerList = innerList self.decoder = decoder } } extension KeyedInnerListDecoder: KeyedDecodingContainerProtocol { var codingPath: [CodingKey] { self.decoder.codingPath } var allKeys: [Key] { keyedInnerListDecoderSupportedKeys.compactMap { Key(stringValue: $0) } } func contains(_ key: Key) -> Bool { keyedInnerListDecoderSupportedKeys.contains(key.stringValue) } func decodeNil(forKey key: Key) throws -> Bool { // Keys are never nil for this type. false } func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } func nestedContainer( keyedBy type: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } func superDecoder() throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } func superDecoder(forKey key: Key) throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/KeyedItemDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues private let keyedItemDecoderSupportedKeys = ["item", "parameters"] /// Used when someone has requested a keyed decoder for a property of item type. /// /// There are only two valid keys for this: "item" and "parameters". struct KeyedItemDecoder where BaseData.Element == UInt8 { private var item: Item private var decoder: _StructuredFieldDecoder init(_ item: Item, decoder: _StructuredFieldDecoder) { self.item = item self.decoder = decoder } } extension KeyedItemDecoder: KeyedDecodingContainerProtocol { var codingPath: [CodingKey] { self.decoder.codingPath } var allKeys: [Key] { keyedItemDecoderSupportedKeys.compactMap { Key(stringValue: $0) } } func contains(_ key: Key) -> Bool { keyedItemDecoderSupportedKeys.contains(key.stringValue) } func decodeNil(forKey key: Key) throws -> Bool { // Keys are never nil for this type. false } func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } func nestedContainer( keyedBy type: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } func superDecoder() throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } func superDecoder(forKey key: Key) throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/KeyedTopLevelListDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues private let keyedTopLevelListDecoderSupportedKeys = ["items"] /// Used when someone has requested a keyed decoder for a property of list type. /// /// There is only one valid key for this: "items". struct KeyedTopLevelListDecoder where BaseData.Element == UInt8 { private var list: [ItemOrInnerList] private var decoder: _StructuredFieldDecoder init(_ list: [ItemOrInnerList], decoder: _StructuredFieldDecoder) { self.list = list self.decoder = decoder } } extension KeyedTopLevelListDecoder: KeyedDecodingContainerProtocol { var codingPath: [CodingKey] { self.decoder.codingPath } var allKeys: [Key] { keyedTopLevelListDecoderSupportedKeys.compactMap { Key(stringValue: $0) } } func contains(_ key: Key) -> Bool { keyedTopLevelListDecoderSupportedKeys.contains(key.stringValue) } func decodeNil(forKey key: Key) throws -> Bool { // Keys are never nil for this type. false } func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } func nestedContainer( keyedBy type: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } func superDecoder() throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } func superDecoder(forKey key: Key) throws -> Decoder { // Items never support inherited types. throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/ParametersDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct ParametersDecoder where BaseData.Element == UInt8 { private var parameters: OrderedMap private var decoder: _StructuredFieldDecoder init(_ parameters: OrderedMap, decoder: _StructuredFieldDecoder) { self.parameters = parameters self.decoder = decoder } } extension ParametersDecoder: KeyedDecodingContainerProtocol { var codingPath: [CodingKey] { self.decoder.codingPath } var allKeys: [Key] { self.parameters.compactMap { Key(stringValue: $0.0) } } func contains(_ key: Key) -> Bool { self.parameters.contains(where: { $0.0 == key.stringValue }) } func decodeNil(forKey key: Key) throws -> Bool { // We will decode nil if the key is not present. !self.contains(key) } func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } func nestedContainer( keyedBy type: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy)) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } func superDecoder() throws -> Decoder { // Parameters never support inherited types. throw StructuredHeaderError.invalidTypeForItem } func superDecoder(forKey key: Key) throws -> Decoder { // Parameters never support inherited types. throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/StructuredFieldValueDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues /// A `StructuredFieldValueDecoder` allows decoding `Decodable` objects from a HTTP /// structured header field. public struct StructuredFieldValueDecoder: Sendable { /// A strategy that should be used to map coding keys to wire format keys. public var keyDecodingStrategy: KeyDecodingStrategy? public init() {} } extension StructuredFieldValueDecoder { /// A strategy that should be used to map coding keys to wire format keys. public struct KeyDecodingStrategy: Hashable, Sendable { fileprivate enum Base: Hashable { case lowercase } fileprivate var base: Base /// Lowercase all coding keys before searching for them in keyed containers such as /// dictionaries or parameters. public static let lowercase = KeyDecodingStrategy(base: .lowercase) } } extension StructuredFieldValueDecoder { /// Attempt to decode an object from a structured header field. /// /// - parameters: /// - type: The type of the object to decode. /// - data: The bytes of the structured header field. /// - throws: If the header field could not be parsed, or could not be decoded. /// - returns: An object of type `StructuredField`. public func decode( _ type: StructuredField.Type = StructuredField.self, from data: BaseData ) throws -> StructuredField where BaseData.Element == UInt8 { switch StructuredField.structuredFieldType { case .item: return try self.decodeItemField(from: data) case .list: return try self.decodeListField(from: data) case .dictionary: return try self.decodeDictionaryField(from: data) } } /// Attempt to decode an object from a structured header dictionary field. /// /// - parameters: /// - type: The type of the object to decode. /// - data: The bytes of the structured header field. /// - throws: If the header field could not be parsed, or could not be decoded. /// - returns: An object of type `StructuredField`. private func decodeDictionaryField( _ type: StructuredField.Type = StructuredField.self, from data: BaseData ) throws -> StructuredField where BaseData.Element == UInt8 { let parser = StructuredFieldValueParser(data) let decoder = _StructuredFieldDecoder(parser, keyDecodingStrategy: self.keyDecodingStrategy) try decoder.parseDictionaryField() return try type.init(from: decoder) } /// Attempt to decode an object from a structured header list field. /// /// - parameters: /// - type: The type of the object to decode. /// - data: The bytes of the structured header field. /// - throws: If the header field could not be parsed, or could not be decoded. /// - returns: An object of type `StructuredField`. private func decodeListField( _ type: StructuredField.Type = StructuredField.self, from data: BaseData ) throws -> StructuredField where BaseData.Element == UInt8 { let parser = StructuredFieldValueParser(data) let decoder = _StructuredFieldDecoder(parser, keyDecodingStrategy: self.keyDecodingStrategy) try decoder.parseListField() return try type.init(from: decoder) } /// Attempt to decode an object from a structured header item field. /// /// - parameters: /// - type: The type of the object to decode. /// - data: The bytes of the structured header field. /// - throws: If the header field could not be parsed, or could not be decoded. /// - returns: An object of type `StructuredField`. private func decodeItemField( _ type: StructuredField.Type = StructuredField.self, from data: BaseData ) throws -> StructuredField where BaseData.Element == UInt8 { let parser = StructuredFieldValueParser(data) let decoder = _StructuredFieldDecoder(parser, keyDecodingStrategy: self.keyDecodingStrategy) try decoder.parseItemField() // An escape hatch here for top-level data: if we don't do this, it'll ask for // an unkeyed container and get very confused. switch type { case is Data.Type: let container = try decoder.singleValueContainer() return try container.decode(Data.self) as! StructuredField case is Decimal.Type: let container = try decoder.singleValueContainer() return try container.decode(Decimal.self) as! StructuredField case is Date.Type: let container = try decoder.singleValueContainer() return try container.decode(Date.self) as! StructuredField case is DisplayString.Type: let container = try decoder.singleValueContainer() return try container.decode(DisplayString.self) as! StructuredField default: return try type.init(from: decoder) } } } class _StructuredFieldDecoder where BaseData.Element == UInt8 { private var parser: StructuredFieldValueParser // For now we use a stack here because the CoW operations on Array would suck. Ideally I'd just have us decode // our way down with values, but doing that is a CoWy nightmare from which we cannot escape. private var _codingStack: [CodingStackEntry] var keyDecodingStrategy: StructuredFieldValueDecoder.KeyDecodingStrategy? init( _ parser: StructuredFieldValueParser, keyDecodingStrategy: StructuredFieldValueDecoder.KeyDecodingStrategy? ) { self.parser = parser self._codingStack = [] self.keyDecodingStrategy = keyDecodingStrategy } } extension _StructuredFieldDecoder: Decoder { var codingPath: [CodingKey] { self._codingStack.map { $0.key as CodingKey } } var userInfo: [CodingUserInfoKey: Any] { [:] } func push(_ codingKey: _StructuredHeaderCodingKey) throws { // This force-unwrap is safe: we cannot create containers without having first // produced the base element, which will always be present. let nextElement = try self.currentElement!.innerElement(for: codingKey) self._codingStack.append(CodingStackEntry(key: codingKey, element: nextElement)) } func pop() { self._codingStack.removeLast() } func container(keyedBy type: Key.Type) throws -> KeyedDecodingContainer where Key: CodingKey { switch self.currentElement! { case .dictionary(let dictionary): return KeyedDecodingContainer(DictionaryKeyedContainer(dictionary, decoder: self)) case .item(let item): return KeyedDecodingContainer(KeyedItemDecoder(item, decoder: self)) case .list(let list): return KeyedDecodingContainer(KeyedTopLevelListDecoder(list, decoder: self)) case .innerList(let innerList): return KeyedDecodingContainer(KeyedInnerListDecoder(innerList, decoder: self)) case .parameters(let parameters): return KeyedDecodingContainer(ParametersDecoder(parameters, decoder: self)) case .bareItem, .bareInnerList: // No keyed container for these types. throw StructuredHeaderError.invalidTypeForItem } } func unkeyedContainer() throws -> UnkeyedDecodingContainer { // We have unkeyed containers for lists, inner lists, and bare inner lists. switch self.currentElement! { case .list(let items): return TopLevelListDecoder(items, decoder: self) case .innerList(let innerList): return BareInnerListDecoder(innerList.bareInnerList, decoder: self) case .bareInnerList(let bareInnerList): return BareInnerListDecoder(bareInnerList, decoder: self) case .dictionary, .item, .bareItem, .parameters: // No unkeyed container for these types. throw StructuredHeaderError.invalidTypeForItem } } func singleValueContainer() throws -> SingleValueDecodingContainer { // We have single value containers for items and bareItems. switch self.currentElement! { case .item(let item): return BareItemDecoder(item.rfc9651BareItem, codingPath: self._codingStack.map { $0.key }) case .bareItem(let bareItem): return BareItemDecoder(bareItem, codingPath: self._codingStack.map { $0.key }) case .dictionary, .list, .innerList, .bareInnerList, .parameters: throw StructuredHeaderError.invalidTypeForItem } } func parseDictionaryField() throws { precondition(self._codingStack.isEmpty) let parsed = try self.parser.parseDictionaryFieldValue() // We unconditionally add to the base of the coding stack here. This element is never popped off. self._codingStack.append(CodingStackEntry(key: .init(stringValue: ""), element: .dictionary(parsed))) } func parseListField() throws { precondition(self._codingStack.isEmpty) let parsed = try self.parser.parseListFieldValue() // We unconditionally add to the base of the coding stack here. This element is never popped off. self._codingStack.append(CodingStackEntry(key: .init(stringValue: ""), element: .list(parsed))) } func parseItemField() throws { precondition(self._codingStack.isEmpty) let parsed = try self.parser.parseItemFieldValue() // We unconditionally add to the base of the coding stack here. This element is never popped off. self._codingStack.append(CodingStackEntry(key: .init(stringValue: ""), element: .item(parsed))) } } extension _StructuredFieldDecoder { /// The basic elements that make up a Structured Header fileprivate enum Element { case dictionary(OrderedMap) case list([ItemOrInnerList]) case item(Item) case innerList(InnerList) case bareItem(RFC9651BareItem) case bareInnerList(BareInnerList) case parameters(OrderedMap) func innerElement(for key: _StructuredHeaderCodingKey) throws -> Element { switch self { case .dictionary(let dictionary): guard let element = dictionary.first(where: { $0.0 == key.stringValue }) else { throw StructuredHeaderError.invalidTypeForItem } switch element.1 { case .item(let item): return .item(item) case .innerList(let innerList): return .innerList(innerList) } case .list(let list): if let offset = key.intValue { guard offset < list.count else { throw StructuredHeaderError.invalidTypeForItem } let index = list.index(list.startIndex, offsetBy: offset) switch list[index] { case .item(let item): return .item(item) case .innerList(let innerList): return .innerList(innerList) } } else if key.stringValue == "items" { // Oh, the outer layer is keyed. That's fine, just put ourselves // back on the stack. return .list(list) } else { throw StructuredHeaderError.invalidTypeForItem } case .item(let item): // Two keys, "item" and "parameters". switch key.stringValue { case "item": return .bareItem(item.rfc9651BareItem) case "parameters": return .parameters(item.rfc9651Parameters) default: throw StructuredHeaderError.invalidTypeForItem } case .innerList(let innerList): // Quick check: is this an integer key? If it is, treat this like a bare inner list. Otherwise // there are two string keys: "items" and "parameters" if key.intValue != nil { return try Element.bareInnerList(innerList.bareInnerList).innerElement(for: key) } switch key.stringValue { case "items": return .bareInnerList(innerList.bareInnerList) case "parameters": return .parameters(innerList.rfc9651Parameters) default: throw StructuredHeaderError.invalidTypeForItem } case .bareItem: // Bare items may never be parsed through. throw StructuredHeaderError.invalidTypeForItem case .bareInnerList(let innerList): guard let offset = key.intValue, offset < innerList.count else { throw StructuredHeaderError.invalidTypeForItem } let index = innerList.index(innerList.startIndex, offsetBy: offset) return .item(innerList[index]) case .parameters(let params): guard let element = params.first(where: { $0.0 == key.stringValue }) else { throw StructuredHeaderError.invalidTypeForItem } return .bareItem(element.1) } } } } extension _StructuredFieldDecoder { /// An entry in the coding stack for _StructuredFieldDecoder. /// /// This is used to keep track of where we are in the decode. private struct CodingStackEntry { var key: _StructuredHeaderCodingKey var element: Element } /// The element at the current head of the coding stack. private var currentElement: Element? { self._codingStack.last.map { $0.element } } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/StructuredHeaderCodingKey.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import RawStructuredFieldValues struct _StructuredHeaderCodingKey: CodingKey { var stringValue: String var intValue: Int? init(stringValue: String) { self.stringValue = stringValue self.intValue = nil } init(intValue: Int) { self.stringValue = "\(intValue)" self.intValue = intValue } init(_ key: Key, keyDecodingStrategy: StructuredFieldValueDecoder.KeyDecodingStrategy?) { switch keyDecodingStrategy { case .none: self.stringValue = key.stringValue case .some(.lowercase): self.stringValue = key.stringValue.lowercased() default: preconditionFailure("Invalid key decoding strategy") } self.intValue = key.intValue } } ================================================ FILE: Sources/StructuredFieldValues/Decoder/TopLevelListDecoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct TopLevelListDecoder where BaseData.Element == UInt8 { private var list: [ItemOrInnerList] private var currentOffset: Int private var decoder: _StructuredFieldDecoder init(_ list: [ItemOrInnerList], decoder: _StructuredFieldDecoder) { self.list = list self.currentOffset = 0 self.decoder = decoder } } extension TopLevelListDecoder: UnkeyedDecodingContainer { var codingPath: [CodingKey] { self.decoder.codingPath } var count: Int? { self.list.count } var isAtEnd: Bool { self.currentOffset == self.list.count } var currentIndex: Int { self.currentOffset } mutating func decodeNil() throws -> Bool { // We never decode nil. false } mutating func decode(_ type: T.Type) throws -> T where T: Decodable { // This is a request to decode a scalar. We decode the next entry and increment the index. guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } switch type { case is Data.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Data.self) as! T case is Decimal.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Decimal.self) as! T case is Date.Type: let container = try self.decoder.singleValueContainer() return try container.decode(Date.self) as! T case is DisplayString.Type: let container = try self.decoder.singleValueContainer() return try container.decode(DisplayString.self) as! T default: return try type.init(from: self.decoder) } } mutating func nestedContainer(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer where NestedKey: CodingKey { // This is a request to decode a full item. We decode the next entry and increment the index. guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } return try self.decoder.container(keyedBy: type) } mutating func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer { guard !self.isAtEnd else { throw StructuredHeaderError.indexOutOfRange } let codingKey = _StructuredHeaderCodingKey(intValue: self.currentOffset) defer { self.currentOffset += 1 } try self.decoder.push(codingKey) defer { self.decoder.pop() } return try self.decoder.unkeyedContainer() } mutating func superDecoder() throws -> Decoder { // No inheritance here folks throw StructuredHeaderError.invalidTypeForItem } } ================================================ FILE: Sources/StructuredFieldValues/DisplayString.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2024 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// A type that represents the Display String Structured Type. public struct DisplayString: RawRepresentable, Codable, Equatable, Hashable, Sendable { public typealias RawValue = String public var rawValue: String public init(rawValue: String) { self.rawValue = rawValue } } ================================================ FILE: Sources/StructuredFieldValues/Docs.docc/index.md ================================================ # ``StructuredFieldValues`` A Swift implementation of the HTTP Structured Header Field Value specification. Provides parsing and serialization facilities for structured header field values, as well as implementations of `Encoder` and `Decoder` to allow using `Codable` data types as the payloads of HTTP structured header fields. ## Overview ### About Structured Header Field Values HTTP Structured Header Field Values are a HTTP extension recorded in [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values. ### Swift HTTP Structured Header Field Values This package provides a parser and serializer that implement RFC 9651. They are entirely complete, able to handle all valid HTTP structured header field values. This package also provides `Encoder` and `Decoder` objects for working with Codable in Swift. This allows rapid prototyping and experimentation with HTTP structured header field values, as well as interaction with the wider Swift Codable community. This package provides two top-level modules: `StructuredFieldValues` and `RawStructuredFieldValues`. This module, `StructuredFieldValues`, uses the related module `RawStructuredFieldValues` to implement `Encoder` and `Decoder`. This interface is friendly and easy to work with. Users who have performance problems with this solution or have specific representational needs should investigate `RawStructuredFieldValues`. ### Working with Structured Header Field Values `StructuredFieldValues` has a simple, easy-to-use high-level API for working with structured header field values. To begin with, let's consider the [HTTP Client Hints specification](https://www.rfc-editor.org/rfc/rfc8942.html). This defines the following new header field: ``` The Accept-CH response header field indicates server support for the hints indicated in its value. Servers wishing to receive user agent information through Client Hints SHOULD add Accept-CH response header to their responses as early as possible. Accept-CH is a Structured Header. Its value MUST be an sf-list whose members are tokens. Its ABNF is: Accept-CH = sf-list For example: Accept-CH: Sec-CH-Example, Sec-CH-Example-2 ``` `swift-http-structured-headers` can parse and serialize this field very simply: ```swift let field = Array("Sec-CH-Example, Sec-CH-Example-2".utf8) struct AcceptCH: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .list var items: [String] } // Decoding let decoder = StructuredFieldValueDecoder() let parsed = try decoder.decode(AcceptCH.self, from: field) // Encoding let encoder = StructuredFieldValueEncoder() let serialized = try encoder.encode(AcceptCH(items: ["Sec-CH-Example", "Sec-CH-Example-2"])) ``` However, structured header field values can be substantially more complex. Structured header fields can make use of 4 containers and 8 base item types. The containers are: 1. Dictionaries. These are top-level elements and associate token keys with values. The values may be items, or may be inner lists, and each value may also have parameters associated with them. `StructuredFieldValues` can model dictionaries as either Swift objects (where the property names are dictionary keys). 2. Lists. These are top-level elements, providing a sequence of items or inner lists. Each item or inner list may have parameters associated with them. `StructuredFieldValues` models these as Swift objects with one key, `items`, that must be a collection of entries. 3. Inner Lists. These are lists that may be sub-entries of a dictionary or a list. The list entries are items, which may have parameters associated with them: additionally, an inner list may have parameters associated with itself as well. `StructuredFieldValues` models these as either Swift `Array`s _or_, if it's important to extract parameters, as a two-field Swift `struct` where one field is called `items` and contains an `Array`, and other field is called `parameters` and contains a dictionary. 4. Parameters. Parameters associate token keys with items without parameters. These are used to store metadata about objects within a field. `StructuredFieldValues` models these as either Swift objects (where the property names are the parameter keys) or as Swift dictionaries. The base types are: 1. Booleans. `StructuredFieldValues` models these as Swift's `Bool` type. 2. Integers. `StructuredFieldValues` models these as any fixed-width integer type. 3. Decimals. `StructuredFieldValues` models these as any floating-point type, or as Foundation's `Decimal`. 4. Tokens. `StructuredFieldValues` models these as Swift's `String` type, where the range of characters is restricted. 5. Strings. `StructuredFieldValues` models these as Swift's `String` type. 6. Binary data. `StructuredFieldValues` models this as Foundation's `Data` type. 7. Dates. `StructuredFieldValues` models these as Foundation's `Date` type. 8. Display strings. `StructuredFieldValues` models these as the `DisplayString` type which it provides. For any Structured Header Field Value Item, the item may either be represented directly by the appropriate type, or by a Swift struct with two properties: `item` and `parameters`. This latter mode is how parameters on a given item may be captured. The top-level Structured Header Field Value must identify what kind of header field it corresponds to by using ``StructuredFieldType``: `.item`, `.list`, or `.dictionary`. This is inherent in the type of the field and will be specified in the relevant field specification. ## Topics ### Declaring Codable Types - ``StructuredFieldValue`` - ``StructuredFieldType`` ### Helper Types - ``DisplayString`` ### Encoding and Decoding - ``StructuredFieldValueEncoder`` - ``StructuredFieldValueDecoder`` ================================================ FILE: Sources/StructuredFieldValues/Encoder/StructuredFieldKeyedEncodingContainer.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import RawStructuredFieldValues /// This object translates between the keys used by the encoder and the keys used by the encoding object. /// /// All methods here call back to similar methods on the encoder. struct StructuredFieldKeyedEncodingContainer { private var encoder: _StructuredFieldEncoder init(encoder: _StructuredFieldEncoder) { self.encoder = encoder } } extension StructuredFieldKeyedEncodingContainer: KeyedEncodingContainerProtocol { var codingPath: [CodingKey] { self.encoder.codingPath } mutating func encodeNil(forKey key: Key) throws { // Nil has no representation in structured headers } mutating func encode(_ value: Bool, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: String, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Double, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Float, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Int, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Int8, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Int16, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Int32, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: Int64, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: UInt, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: UInt8, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: UInt16, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: UInt32, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: UInt64, forKey key: Key) throws { try self.encoder.encode(value, forKey: key.stringValue) } mutating func encode(_ value: T, forKey key: Key) throws where T: Encodable { try self.encoder.encode(value, forKey: key.stringValue) } mutating func nestedContainer( keyedBy keyType: NestedKey.Type, forKey key: Key ) -> KeyedEncodingContainer where NestedKey: CodingKey { self.encoder.container(keyedBy: keyType) } mutating func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer { self.encoder.unkeyedContainer() } mutating func superEncoder() -> Encoder { self.encoder } mutating func superEncoder(forKey key: Key) -> Encoder { self.encoder } } ================================================ FILE: Sources/StructuredFieldValues/Encoder/StructuredFieldUnkeyedEncodingContainer.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import RawStructuredFieldValues /// This object translates between the unkeyed coding API and methods on the encoder. /// /// All methods here call back to similar methods on the encoder. struct StructuredFieldUnkeyedEncodingContainer { private var encoder: _StructuredFieldEncoder init(encoder: _StructuredFieldEncoder) { self.encoder = encoder } } extension StructuredFieldUnkeyedEncodingContainer: UnkeyedEncodingContainer { var codingPath: [CodingKey] { self.encoder.codingPath } var count: Int { self.encoder.count } func encodeNil() throws { try self.encoder.appendNil() } func encode(_ value: Bool) throws { try self.encoder.append(value) } func encode(_ value: String) throws { try self.encoder.append(value) } func encode(_ value: Double) throws { try self.encoder.append(value) } func encode(_ value: Float) throws { try self.encoder.append(value) } func encode(_ value: Int) throws { try self.encoder.append(value) } func encode(_ value: Int8) throws { try self.encoder.append(value) } func encode(_ value: Int16) throws { try self.encoder.append(value) } func encode(_ value: Int32) throws { try self.encoder.append(value) } func encode(_ value: Int64) throws { try self.encoder.append(value) } func encode(_ value: UInt) throws { try self.encoder.append(value) } func encode(_ value: UInt8) throws { try self.encoder.append(value) } func encode(_ value: UInt16) throws { try self.encoder.append(value) } func encode(_ value: UInt32) throws { try self.encoder.append(value) } func encode(_ value: UInt64) throws { try self.encoder.append(value) } func encode(_ value: T) throws where T: Encodable { try self.encoder.append(value) } mutating func nestedContainer(keyedBy keyType: NestedKey.Type) -> KeyedEncodingContainer where NestedKey: CodingKey { self.encoder.container(keyedBy: keyType) } mutating func nestedUnkeyedContainer() -> UnkeyedEncodingContainer { self.encoder.unkeyedContainer() } mutating func superEncoder() -> Encoder { self.encoder } } ================================================ FILE: Sources/StructuredFieldValues/Encoder/StructuredFieldValueEncoder.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues /// A `StructuredFieldValueEncoder` allows encoding `Encodable` objects to the format of a HTTP /// structured header field. public struct StructuredFieldValueEncoder: Sendable { public var keyEncodingStrategy: KeyEncodingStrategy? public init() {} } extension StructuredFieldValueEncoder { /// A strategy that should be used to map coding keys to wire format keys. public struct KeyEncodingStrategy: Hashable, Sendable { fileprivate enum Base: Hashable { case lowercase } fileprivate var base: Base /// Lowercase all coding keys before encoding them in keyed containers such as /// dictionaries or parameters. public static let lowercase = KeyEncodingStrategy(base: .lowercase) } } extension StructuredFieldValueEncoder { /// Attempt to encode an object into a structured header field. /// /// - parameters: /// - data: The object to encode. /// - throws: If the header field could not be encoded, or could not be serialized. /// - returns: The bytes representing the HTTP structured header field. public func encode(_ data: StructuredField) throws -> [UInt8] { switch StructuredField.structuredFieldType { case .item: return try self.encodeItemField(data) case .list: return try self.encodeListField(data) case .dictionary: return try self.encodeDictionaryField(data) } } /// Attempt to encode an object into a structured header dictionary field. /// /// - parameters: /// - data: The object to encode. /// - throws: If the header field could not be encoded, or could not be serialized. /// - returns: The bytes representing the HTTP structured header field. private func encodeDictionaryField(_ data: StructuredField) throws -> [UInt8] { let serializer = StructuredFieldValueSerializer() let encoder = _StructuredFieldEncoder(serializer, keyEncodingStrategy: self.keyEncodingStrategy) return try encoder.encodeDictionaryField(data) } /// Attempt to encode an object into a structured header list field. /// /// - parameters: /// - data: The object to encode. /// - throws: If the header field could not be encoded, or could not be serialized. /// - returns: The bytes representing the HTTP structured header field. private func encodeListField(_ data: StructuredField) throws -> [UInt8] { let serializer = StructuredFieldValueSerializer() let encoder = _StructuredFieldEncoder(serializer, keyEncodingStrategy: self.keyEncodingStrategy) return try encoder.encodeListField(data) } /// Attempt to encode an object into a structured header item field. /// /// - parameters: /// - data: The object to encode. /// - throws: If the header field could not be encoded, or could not be serialized. /// - returns: The bytes representing the HTTP structured header field. private func encodeItemField(_ data: StructuredField) throws -> [UInt8] { let serializer = StructuredFieldValueSerializer() let encoder = _StructuredFieldEncoder(serializer, keyEncodingStrategy: self.keyEncodingStrategy) return try encoder.encodeItemField(data) } } class _StructuredFieldEncoder { private var serializer: StructuredFieldValueSerializer // For now we use a stack here because the CoW operations on Array would stuck. Ideally I'd just have us decode // our way down with values, but doing that is a CoWy nightmare from which we cannot escape. private var _codingPath: [CodingStackEntry] private var currentStackEntry: CodingStackEntry internal var keyEncodingStrategy: StructuredFieldValueEncoder.KeyEncodingStrategy? init( _ serializer: StructuredFieldValueSerializer, keyEncodingStrategy: StructuredFieldValueEncoder.KeyEncodingStrategy? ) { self.serializer = serializer self._codingPath = [] self.keyEncodingStrategy = keyEncodingStrategy // This default doesn't matter right now. self.currentStackEntry = CodingStackEntry(key: .init(stringValue: ""), storage: .itemHeader) } fileprivate func encodeDictionaryField(_ data: StructuredField) throws -> [UInt8] { self.push(key: .init(stringValue: ""), newStorage: .dictionaryHeader) try data.encode(to: self) switch self.currentStackEntry.storage { case .dictionary(let map): return try self.serializer.writeDictionaryFieldValue(map) case .dictionaryHeader: // No encoding happened. return [] case .listHeader, .list, .itemHeader, .item, .bareInnerList, .innerList, .parameters, .itemOrInnerList: throw StructuredHeaderError.invalidTypeForItem } } fileprivate func encodeListField(_ data: StructuredField) throws -> [UInt8] { self.push(key: .init(stringValue: ""), newStorage: .listHeader) try data.encode(to: self) switch self.currentStackEntry.storage { case .list(let list): return try self.serializer.writeListFieldValue(list) case .listHeader: // No encoding happened return [] case .dictionaryHeader, .dictionary, .itemHeader, .item, .bareInnerList, .innerList, .parameters, .itemOrInnerList: throw StructuredHeaderError.invalidTypeForItem } } fileprivate func encodeItemField(_ data: StructuredField) throws -> [UInt8] { self.push(key: .init(stringValue: ""), newStorage: .itemHeader) // There's an awkward special hook here: if the outer type is `Data`, `Decimal`, `Date` or // `DisplayString`, we skip the regular encoding path. // // Everything else goes through the normal flow. switch data { case is Data: try self.encode(data) case is Decimal: try self.encode(data) case is Date: try self.encode(data) case is DisplayString: try self.encode(data) default: try data.encode(to: self) } switch self.currentStackEntry.storage { case .item(let item): return try self.serializer.writeItemFieldValue(Item(item)) case .itemHeader: // No encoding happened return [] case .dictionaryHeader, .dictionary, .listHeader, .list, .bareInnerList, .innerList, .parameters, .itemOrInnerList: throw StructuredHeaderError.invalidTypeForItem } } } extension _StructuredFieldEncoder: Encoder { var codingPath: [CodingKey] { self._codingPath.map { $0.key as CodingKey } } var userInfo: [CodingUserInfoKey: Any] { [:] } func push(key: _StructuredHeaderCodingKey, newStorage: NodeType) { self._codingPath.append(self.currentStackEntry) self.currentStackEntry = .init(key: key, storage: newStorage) } func pop() throws { // This is called when we've completed the storage in the current container. // We can pop the value at the base of the stack, then "insert" the current one // into it, and save the new value as the new current. let current = self.currentStackEntry var newCurrent = self._codingPath.removeLast() try newCurrent.storage.insert(current.storage, atKey: current.key) self.currentStackEntry = newCurrent } func container(keyedBy type: Key.Type) -> KeyedEncodingContainer where Key: CodingKey { KeyedEncodingContainer(StructuredFieldKeyedEncodingContainer(encoder: self)) } func unkeyedContainer() -> UnkeyedEncodingContainer { StructuredFieldUnkeyedEncodingContainer(encoder: self) } func singleValueContainer() -> SingleValueEncodingContainer { self } } extension _StructuredFieldEncoder: SingleValueEncodingContainer { func encodeNil() throws { // bare items are never nil. throw StructuredHeaderError.invalidTypeForItem } func encode(_ value: Bool) throws { try self.currentStackEntry.storage.insertBareItem(.bool(value)) } func encode(_ value: String) throws { if value.structuredHeadersIsValidToken { try self.currentStackEntry.storage.insertBareItem(.token(value)) } else { try self.currentStackEntry.storage.insertBareItem(.string(value)) } } func encode(_ value: Double) throws { try self._encodeBinaryFloatingPoint(value) } func encode(_ value: Float) throws { try self._encodeBinaryFloatingPoint(value) } func encode(_ value: Int) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: Int8) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: Int16) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: Int32) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: Int64) throws { try self._encodeFixedWidthInteger(value) } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func encode(_ value: Int128) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: UInt) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: UInt8) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: UInt16) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: UInt32) throws { try self._encodeFixedWidthInteger(value) } func encode(_ value: UInt64) throws { try self._encodeFixedWidthInteger(value) } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) func encode(_ value: UInt128) throws { try self._encodeFixedWidthInteger(value) } func encode(_ data: Data) throws { let encoded = data.base64EncodedString() try self.currentStackEntry.storage.insertBareItem(.undecodedByteSequence(encoded)) } func encode(_ data: Decimal) throws { let significand = (data.significand.magnitude as NSNumber).intValue // Yes, really. guard let exponent = Int8(exactly: data.exponent) else { throw StructuredHeaderError.invalidIntegerOrDecimal } let pd = PseudoDecimal(mantissa: significand * (data.isSignMinus ? -1 : 1), exponent: Int(exponent)) try self.currentStackEntry.storage.insertBareItem(.decimal(pd)) } func encode(_ data: Date) throws { let date = Int64(data.timeIntervalSince1970) try self.currentStackEntry.storage.insertBareItem(.date(date)) } func encode(_ data: DisplayString) throws { try self.currentStackEntry.storage.insertBareItem(.displayString(data.rawValue)) } func encode(_ value: T) throws where T: Encodable { switch value { case let value as UInt8: try self.encode(value) case let value as Int8: try self.encode(value) case let value as UInt16: try self.encode(value) case let value as Int16: try self.encode(value) case let value as UInt32: try self.encode(value) case let value as Int32: try self.encode(value) case let value as UInt64: try self.encode(value) case let value as Int64: try self.encode(value) case let value as Int: try self.encode(value) case let value as UInt: try self.encode(value) case let value as Float: try self.encode(value) case let value as Double: try self.encode(value) case let value as String: try self.encode(value) case let value as Bool: try self.encode(value) case let value as Data: try self.encode(value) case let value as Decimal: try self.encode(value) case let value as Date: try self.encode(value) case let value as DisplayString: try self.encode(value) default: throw StructuredHeaderError.invalidTypeForItem } } private func _encodeBinaryFloatingPoint(_ value: T) throws { // We go via double and encode it as a decimal. let pseudoDecimal = try PseudoDecimal(Double(value)) try self.currentStackEntry.storage.insertBareItem(.decimal(pseudoDecimal)) } private func _encodeFixedWidthInteger(_ value: T) throws { guard let base = Int64(exactly: value) else { throw StructuredHeaderError.integerOutOfRange } try self.currentStackEntry.storage.insertBareItem(.integer(base)) } } extension _StructuredFieldEncoder { // This extension sort-of corresponds to the unkeyed encoding container: all of // these methods are called from there. var count: Int { switch self.currentStackEntry.storage { case .bareInnerList(let list): return list.count case .innerList(let list): return list.bareInnerList.count case .itemOrInnerList: return 0 case .list(let list): return list.count case .listHeader: return 0 case .dictionaryHeader, .dictionary, .itemHeader, .item, .parameters: fatalError("Cannot have unkeyed container at \(self.currentStackEntry)") } } func appendNil() throws { // list entries are never nil. throw StructuredHeaderError.invalidTypeForItem } func append(_ value: Bool) throws { try self.currentStackEntry.storage.appendBareItem(.bool(value)) } func append(_ value: String) throws { if value.structuredHeadersIsValidToken { try self.currentStackEntry.storage.appendBareItem(.token(value)) } else { try self.currentStackEntry.storage.appendBareItem(.string(value)) } } func append(_ value: Double) throws { try self._appendBinaryFloatingPoint(value) } func append(_ value: Float) throws { try self._appendBinaryFloatingPoint(value) } func append(_ value: Int) throws { try self._appendFixedWidthInteger(value) } func append(_ value: Int8) throws { try self._appendFixedWidthInteger(value) } func append(_ value: Int16) throws { try self._appendFixedWidthInteger(value) } func append(_ value: Int32) throws { try self._appendFixedWidthInteger(value) } func append(_ value: Int64) throws { try self._appendFixedWidthInteger(value) } func append(_ value: UInt) throws { try self._appendFixedWidthInteger(value) } func append(_ value: UInt8) throws { try self._appendFixedWidthInteger(value) } func append(_ value: UInt16) throws { try self._appendFixedWidthInteger(value) } func append(_ value: UInt32) throws { try self._appendFixedWidthInteger(value) } func append(_ value: UInt64) throws { try self._appendFixedWidthInteger(value) } func append(_ value: Data) throws { try self.currentStackEntry.storage.appendBareItem(.undecodedByteSequence(value.base64EncodedString())) } func append(_ value: Decimal) throws { let significand = (value.significand.magnitude as NSNumber).intValue // Yes, really. guard let exponent = Int8(exactly: value.exponent) else { throw StructuredHeaderError.invalidIntegerOrDecimal } let pd = PseudoDecimal(mantissa: significand * (value.isSignMinus ? -1 : 1), exponent: Int(exponent)) try self.currentStackEntry.storage.appendBareItem(.decimal(pd)) } func append(_ value: Date) throws { let date = Int64(value.timeIntervalSince1970) try self.currentStackEntry.storage.appendBareItem(.date(date)) } func append(_ value: DisplayString) throws { try self.currentStackEntry.storage.appendBareItem(.displayString(value.rawValue)) } func append(_ value: T) throws where T: Encodable { switch value { case let value as UInt8: try self.append(value) case let value as Int8: try self.append(value) case let value as UInt16: try self.append(value) case let value as Int16: try self.append(value) case let value as UInt32: try self.append(value) case let value as Int32: try self.append(value) case let value as UInt64: try self.append(value) case let value as Int64: try self.append(value) case let value as Int: try self.append(value) case let value as UInt: try self.append(value) case let value as Float: try self.append(value) case let value as Double: try self.append(value) case let value as String: try self.append(value) case let value as Bool: try self.append(value) case let value as Data: try self.append(value) case let value as Decimal: try self.append(value) case let value as Date: try self.append(value) case let value as DisplayString: try self.append(value) default: // Some other codable type. switch self.currentStackEntry.storage { case .listHeader, .list: // This may be an item or inner list. self.push(key: .init(intValue: self.count), newStorage: .itemOrInnerList([:])) try value.encode(to: self) try self.pop() case .itemOrInnerList(let params): // This is an inner list. self.currentStackEntry.storage = .innerList(InnerList(bareInnerList: [], parameters: params)) fallthrough case .innerList, .bareInnerList: // This may only be an item. self.push(key: .init(intValue: self.count), newStorage: .item(.init(bareItem: nil, parameters: [:]))) try value.encode(to: self) try self.pop() case .dictionaryHeader, .dictionary, .itemHeader, .item, .parameters: throw StructuredHeaderError.invalidTypeForItem } } } private func _appendBinaryFloatingPoint(_ value: T) throws { // We go via double and encode it as a decimal. let pseudoDecimal = try PseudoDecimal(Double(value)) try self.currentStackEntry.storage.appendBareItem(.decimal(pseudoDecimal)) } private func _appendFixedWidthInteger(_ value: T) throws { guard let base = Int64(exactly: value) else { throw StructuredHeaderError.integerOutOfRange } try self.currentStackEntry.storage.appendBareItem(.integer(base)) } } extension _StructuredFieldEncoder { // This extension sort-of corresponds to the keyed encoding container: all of // these methods are called from there. All our keyed encoding containers use // string keys. func encode(_ value: Bool, forKey key: String) throws { let key = self.sanitizeKey(key) try self.currentStackEntry.storage.insertBareItem(.bool(value), atKey: key) } func encode(_ value: String, forKey key: String) throws { let key = self.sanitizeKey(key) if value.structuredHeadersIsValidToken { try self.currentStackEntry.storage.insertBareItem(.token(value), atKey: key) } else { try self.currentStackEntry.storage.insertBareItem(.string(value), atKey: key) } } func encode(_ value: Double, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeBinaryFloatingPoint(value, forKey: key) } func encode(_ value: Float, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeBinaryFloatingPoint(value, forKey: key) } func encode(_ value: Int, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: Int8, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: Int16, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: Int32, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: Int64, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: UInt, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: UInt8, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: UInt16, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: UInt32, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: UInt64, forKey key: String) throws { let key = self.sanitizeKey(key) try self._encodeFixedWidthInteger(value, forKey: key) } func encode(_ value: Data, forKey key: String) throws { let key = self.sanitizeKey(key) try self.currentStackEntry.storage.insertBareItem( .undecodedByteSequence(value.base64EncodedString()), atKey: key ) } func encode(_ value: Decimal, forKey key: String) throws { let significand = (value.significand.magnitude as NSNumber).intValue // Yes, really. guard let exponent = Int8(exactly: value.exponent) else { throw StructuredHeaderError.invalidIntegerOrDecimal } let pd = PseudoDecimal(mantissa: significand * (value.isSignMinus ? -1 : 1), exponent: Int(exponent)) try self.currentStackEntry.storage.insertBareItem(.decimal(pd), atKey: key) } func encode(_ value: Date, forKey key: String) throws { let key = self.sanitizeKey(key) let date = Int64(value.timeIntervalSince1970) try self.currentStackEntry.storage.insertBareItem(.date(date), atKey: key) } func encode(_ value: DisplayString, forKey key: String) throws { let key = self.sanitizeKey(key) let displayString = value.rawValue try self.currentStackEntry.storage.insertBareItem(.displayString(displayString), atKey: key) } func encode(_ value: T, forKey key: String) throws where T: Encodable { let key = self.sanitizeKey(key) switch value { case let value as UInt8: try self.encode(value, forKey: key) case let value as Int8: try self.encode(value, forKey: key) case let value as UInt16: try self.encode(value, forKey: key) case let value as Int16: try self.encode(value, forKey: key) case let value as UInt32: try self.encode(value, forKey: key) case let value as Int32: try self.encode(value, forKey: key) case let value as UInt64: try self.encode(value, forKey: key) case let value as Int64: try self.encode(value, forKey: key) case let value as Int: try self.encode(value, forKey: key) case let value as UInt: try self.encode(value, forKey: key) case let value as Float: try self.encode(value, forKey: key) case let value as Double: try self.encode(value, forKey: key) case let value as String: try self.encode(value, forKey: key) case let value as Bool: try self.encode(value, forKey: key) case let value as Data: try self.encode(value, forKey: key) case let value as Decimal: try self.encode(value, forKey: key) case let value as Date: try self.encode(value, forKey: key) case let value as DisplayString: try self.encode(value, forKey: key) default: // Ok, we don't know what this is. This can only happen for a dictionary, or // for anything with parameters, or for lists, or for inner lists. switch self.currentStackEntry.storage { case .dictionaryHeader: // Ah, this is a dictionary, good to know. Initialize the storage, keep going. self.currentStackEntry.storage = .dictionary([:]) fallthrough case .dictionary: // This must be an item or inner list. self.push(key: .init(stringValue: key), newStorage: .itemOrInnerList([:])) try value.encode(to: self) try self.pop() case .item: guard key == "parameters" else { throw StructuredHeaderError.invalidTypeForItem } self.push(key: .init(stringValue: key), newStorage: .parameters([:])) try value.encode(to: self) try self.pop() case .innerList: switch key { case "items": self.push(key: .init(stringValue: key), newStorage: .bareInnerList([])) try value.encode(to: self) try self.pop() case "parameters": self.push(key: .init(stringValue: key), newStorage: .parameters([:])) try value.encode(to: self) try self.pop() default: throw StructuredHeaderError.invalidTypeForItem } case .itemOrInnerList(let params): switch key { case "items": // We're a list! self.currentStackEntry.storage = .innerList(InnerList(bareInnerList: [], parameters: params)) self.push(key: .init(stringValue: key), newStorage: .bareInnerList([])) try value.encode(to: self) try self.pop() case "parameters": self.push(key: .init(stringValue: key), newStorage: .parameters([:])) try value.encode(to: self) try self.pop() default: throw StructuredHeaderError.invalidTypeForItem } case .listHeader: switch key { case "items": // Ok, we're a list. Good to know. self.push(key: .init(stringValue: key), newStorage: .list([])) try value.encode(to: self) try self.pop() default: throw StructuredHeaderError.invalidTypeForItem } case .list, .itemHeader, .bareInnerList, .parameters: throw StructuredHeaderError.invalidTypeForItem } } } private func _encodeFixedWidthInteger(_ value: T, forKey key: String) throws { guard let base = Int64(exactly: value) else { throw StructuredHeaderError.integerOutOfRange } try self.currentStackEntry.storage.insertBareItem(.integer(base), atKey: key) } private func _encodeBinaryFloatingPoint(_ value: T, forKey key: String) throws { let pseudoDecimal = try PseudoDecimal(Double(value)) try self.currentStackEntry.storage.insertBareItem(.decimal(pseudoDecimal), atKey: key) } private func sanitizeKey(_ key: String) -> String { if self.keyEncodingStrategy == .lowercase { return key.lowercased() } else { return key } } } extension _StructuredFieldEncoder { /// An entry in the coding stack for _StructuredFieldEncoder. /// /// This is used to keep track of where we are in the encode. private struct CodingStackEntry { var key: _StructuredHeaderCodingKey var storage: NodeType } /// The type of the node at the current level of the encoding hierarchy. /// This controls what container types are allowed, and is where partial /// encodes are stored. /// /// Note that we never have a bare item here. This is deliberate: bare items /// are not a container for anything else, and so can never appear. internal enum NodeType { case dictionaryHeader case listHeader case itemHeader case dictionary(OrderedMap) case list([ItemOrInnerList]) case innerList(InnerList) case item(PartialItem) case bareInnerList(BareInnerList) case parameters(OrderedMap) case itemOrInnerList(OrderedMap) /// A helper struct used to tolerate the fact that we need partial items, /// but our `Item` struct doesn't like that much. struct PartialItem { var bareItem: RFC9651BareItem? var parameters: OrderedMap } /// This is called when a complete object has been built. mutating func insert(_ childData: NodeType, atKey key: _StructuredHeaderCodingKey) throws { // Only some things can be inside other things, and often that relies on // the specifics of the key. switch (self, childData) { case (.item(var item), .parameters(let params)) where key.stringValue == "parameters": // Oh cool, parameters. Love it. Save it. item.parameters = params self = .item(item) case (.innerList(var list), .parameters(let params)) where key.stringValue == "parameters": list.rfc9651Parameters = params self = .innerList(list) case (.innerList(var list), .bareInnerList(let bare)) where key.stringValue == "items": list.bareInnerList = bare self = .innerList(list) case (.innerList(var list), .item(let item)) where key.intValue != nil: list.bareInnerList.append(Item(item)) self = .innerList(list) case (.bareInnerList(var list), .item(let item)): precondition(key.intValue == list.count) list.append(Item(item)) self = .bareInnerList(list) case (.itemOrInnerList, .parameters(let params)) where key.stringValue == "parameters": self = .itemOrInnerList(params) case (.itemOrInnerList, .item(let item)): self = .item(item) case (.itemOrInnerList, .innerList(let list)): self = .innerList(list) case (.dictionary(var map), .innerList(let innerList)): map[key.stringValue] = .innerList(innerList) self = .dictionary(map) case (.dictionary(var map), .item(let item)): map[key.stringValue] = .item(Item(item)) self = .dictionary(map) case (.listHeader, .list(let list)) where key.stringValue == "items": self = .list(list) case (.listHeader, .innerList(let innerList)) where key.intValue != nil: self = .list([.innerList(innerList)]) case (.listHeader, .item(let item)) where key.intValue != nil: self = .list([.item(Item(item))]) case (.list(var list), .innerList(let innerList)) where key.intValue != nil: list.append(.innerList(innerList)) self = .list(list) case (.list(var list), .item(let item)) where key.intValue != nil: list.append(.item(Item(item))) self = .list(list) default: throw StructuredHeaderError.invalidTypeForItem } } /// Called to insert a bare item at a given level of the hierarchy. /// /// If the key is missing we will require the type to be `item`, in which case /// this will be for the "item" key. mutating func insertBareItem(_ bareItem: RFC9651BareItem, atKey key: String? = nil) throws { switch self { case .itemHeader: guard key == nil || key == "item" else { throw StructuredHeaderError.invalidTypeForItem } self = .item(PartialItem(bareItem: bareItem, parameters: [:])) case .item(var partial): if key == nil || key == "item" { partial.bareItem = bareItem self = .item(partial) } else { throw StructuredHeaderError.invalidTypeForItem } case .itemOrInnerList(let params): // Key can only be item: if we have a key, we must have asked for a keyed // container, which would have disambiguated what we were getting. if key == "item" { self = .item(PartialItem(bareItem: bareItem, parameters: params)) } else { throw StructuredHeaderError.invalidTypeForItem } case .dictionaryHeader: // Ok cool, this is a dictionary. var map = OrderedMap() // Bare item here means item, no parameters. map[key!] = .item(.init(bareItem: bareItem, parameters: [:])) self = .dictionary(map) case .dictionary(var map): // Bare item here means item, no parameters. map[key!] = .item(.init(bareItem: bareItem, parameters: [:])) self = .dictionary(map) case .parameters(var map): map[key!] = bareItem self = .parameters(map) case .listHeader, .list, .innerList, .bareInnerList: throw StructuredHeaderError.invalidTypeForItem } } /// Appends a bare item to the given container. This must be a list-type /// container that stores either bare items, or items. mutating func appendBareItem(_ bareItem: RFC9651BareItem) throws { switch self { case .listHeader: self = .list([.item(Item(bareItem: bareItem, parameters: [:]))]) case .list(var list): list.append(.item(Item(bareItem: bareItem, parameters: [:]))) self = .list(list) case .innerList(var list): list.bareInnerList.append(Item(bareItem: bareItem, parameters: [:])) self = .innerList(list) case .bareInnerList(var list): list.append(Item(bareItem: bareItem, parameters: [:])) self = .bareInnerList(list) case .itemOrInnerList(let params): // This is an inner list. self = .innerList( InnerList(bareInnerList: [Item(bareItem: bareItem, parameters: [:])], parameters: params) ) case .dictionaryHeader, .dictionary, .itemHeader, .item, .parameters: throw StructuredHeaderError.invalidTypeForItem } } } } extension Item { fileprivate init(_ partialItem: _StructuredFieldEncoder.NodeType.PartialItem) { self.init(bareItem: partialItem.bareItem!, parameters: partialItem.parameters) } } ================================================ FILE: Sources/StructuredFieldValues/StructuredFieldValue.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// A `StructuredFieldValue` is a `Codable` representation of a HTTP Structured /// Header Field. /// /// This protocol is a helper protocol that refines `Codable` to indicate what kind /// of header field a given field uses. public protocol StructuredFieldValue: Codable { static var structuredFieldType: StructuredFieldType { get } } /// The kinds of header fields used in HTTP Structured Headers. public enum StructuredFieldType: Sendable { /// An item field consists of a single item, optionally with parameters. case item /// A list field consists of a list made up of inner lists or items. case list /// A dictionary field is an ordered collection of key-value pairs. case dictionary } ================================================ FILE: Sources/sh-parser/main.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues struct Flags { var headerType: HeaderType init() { // Default to item self.headerType = .item let arguments = ProcessInfo.processInfo.arguments for argument in arguments.dropFirst() { switch argument { case "--dictionary": self.headerType = .dictionary case "--list": self.headerType = .list case "--item": self.headerType = .item default: Self.helpAndExit() } } } private static func helpAndExit() -> Never { print("Flags:") print("") print("\t--dictionary: Parse as dictionary field") print("\t--list: Parse as list field") print("\t--item: Parse as item field (default)") exit(2) } } extension Flags { enum HeaderType { case dictionary case list case item } } enum Header { case dictionary(OrderedMap) case list([ItemOrInnerList]) case item(Item) func prettyPrint() { switch self { case .dictionary(let dict): print("- dictionary (\(dict.count) entries):") dict.prettyPrint(depth: 1) case .list(let list): print("- list (\(list.count) entries):") list.prettyPrint(depth: 1) case .item(let item): print("- item:") item.prettyPrint(depth: 1) } } } extension Array where Element == ItemOrInnerList { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) for (offset, element) in self.enumerated() { print("\(tabs)- [\(offset)]:") element.prettyPrint(depth: depth + 1) } } } extension OrderedMap where Key == String, Value == ItemOrInnerList { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) for (key, value) in self { print("\(tabs)- \(key):") value.prettyPrint(depth: depth + 1) } } } extension OrderedMap where Key == String, Value == RFC9651BareItem { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) for (key, value) in self { print("\(tabs)- \(key): \(value.prettyFormat())") } } } extension ItemOrInnerList { func prettyPrint(depth: Int) { switch self { case .item(let item): item.prettyPrint(depth: depth) case .innerList(let list): list.prettyPrint(depth: depth) } } } extension Item { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) print("\(tabs)- item: \(self.rfc9651BareItem.prettyFormat())") print("\(tabs)- parameters (\(rfc9651Parameters.count) entries):") self.rfc9651Parameters.prettyPrint(depth: depth + 1) } } extension InnerList { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) print("\(tabs)- innerList (\(rfc9651Parameters.count) entries):") self.bareInnerList.prettyPrint(depth: depth + 1) print("\(tabs)- parameters (\(rfc9651Parameters.count) entries):") self.rfc9651Parameters.prettyPrint(depth: depth + 1) } } extension BareInnerList { func prettyPrint(depth: Int) { let tabs = String(repeating: "\t", count: depth) for (offset, element) in self.enumerated() { print("\(tabs)- [\(offset)]:") element.prettyPrint(depth: depth + 1) } } } extension RFC9651BareItem { func prettyFormat() -> String { switch self { case .bool(let bool): return "boolean \(bool)" case .integer(let int): return "integer \(int)" case .string(let string): return "string \"\(string)\"" case .token(let token): return "token \(token)" case .undecodedByteSequence(let bytes): return "byte sequence \(bytes)" case .decimal(let decimal): let d = Decimal( sign: decimal.mantissa > 0 ? .plus : .minus, exponent: Int(decimal.exponent), significand: Decimal(decimal.mantissa) ) return "decimal \(d)" case .date(let date): return "date \(date)" case .displayString(let displayString): return "display string \(displayString)" } } } func main() { do { let flags = Flags() var data = FileHandle.standardInput.readDataToEndOfFile() // We need to strip trailing newlines. var index = data.endIndex while index > data.startIndex { data.formIndex(before: &index) if data[index] != UInt8(ascii: "\n") { break } } data = data[...index] var parser = StructuredFieldValueParser(data) let result: Header switch flags.headerType { case .dictionary: result = .dictionary(try parser.parseDictionaryFieldValue()) case .list: result = .list(try parser.parseListFieldValue()) case .item: result = .item(try parser.parseItemFieldValue()) } result.prettyPrint() } catch { print("error: \(error)") exit(1) } } main() ================================================ FILE: Tests/StructuredFieldValuesTests/Base32.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation private let base32DecoderAlphabet: [UnicodeScalar: UInt64] = [ "A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "F": 5, "G": 6, "H": 7, "I": 8, "J": 9, "K": 10, "L": 11, "M": 12, "N": 13, "O": 14, "P": 15, "Q": 16, "R": 17, "S": 18, "T": 19, "U": 20, "V": 21, "W": 22, "X": 23, "Y": 24, "Z": 25, "2": 26, "3": 27, "4": 28, "5": 29, "6": 30, "7": 31, ] extension Data { init(base32Encoded data: Data) { self = Data() for start in stride(from: data.startIndex, to: data.endIndex, by: 8) { let bytes = data[start..<(start + 8)] precondition(bytes.count == 8) var seenEquals = 0 var rawValue = UInt64(0) for character in bytes { // Each character encodes 5 bits. The equals pad with zeros _on the right_, so we must shift for every // character we see. rawValue <<= 5 if character == UInt8(ascii: "=") { seenEquals += 1 continue } let underlyingValue = base32DecoderAlphabet[UnicodeScalar(character)]! rawValue |= underlyingValue } let ignoredBytes: Int switch seenEquals { case 0: ignoredBytes = 0 case 1: ignoredBytes = 1 case 3: ignoredBytes = 2 case 4: ignoredBytes = 3 case 6: ignoredBytes = 4 default: fatalError("Impossible equals count: \(seenEquals)") } for byteNumber in (ignoredBytes..<5).reversed() { let byte = UInt8(truncatingIfNeeded: rawValue >> (byteNumber * 8)) self.append(byte) } } } } ================================================ FILE: Tests/StructuredFieldValuesTests/Fixtures.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation enum FixturesLoader { private static var fixturesDirectory: URL { let myURL = URL(fileURLWithPath: #filePath, isDirectory: false) return URL(string: "../TestFixtures/", relativeTo: myURL)!.absoluteURL } private static var serializationFixturesDirectory: URL { fixturesDirectory.appendingPathComponent("serialisation-tests").absoluteURL } static var parsingFixtures: [StructuredHeaderTestFixture] { // ContentsOfDirectory can throw if it hits EINTR, just spin var files: [URL]? for _ in 0..<1000 { do { files = try FileManager.default.contentsOfDirectory( at: fixturesDirectory, includingPropertiesForKeys: nil, options: [] ) break } catch let error as NSError { guard let underlyingError = error.userInfo[NSUnderlyingErrorKey] as? NSError, underlyingError.domain == NSPOSIXErrorDomain, underlyingError.code == EINTR else { fatalError("\(error)") } // Ok, we'll continue } } guard let realFiles = files else { fatalError("Hit EINTR 1000 times!") } let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase return realFiles.filter { $0.pathExtension == "json" }.flatMap { file -> [StructuredHeaderTestFixture] in let content = try! Data(contentsOf: file, options: [.uncached, .mappedIfSafe]) return try! decoder.decode([StructuredHeaderTestFixture].self, from: content) } } static var serializingFixtures: [StructuredHeaderTestFixture] { // ContentsOfDirectory can throw if it hits EINTR, just spin var files: [URL]? for _ in 0..<1000 { do { files = try FileManager.default.contentsOfDirectory( at: serializationFixturesDirectory, includingPropertiesForKeys: nil, options: [] ) break } catch let error as NSError { guard let underlyingError = error.userInfo[NSUnderlyingErrorKey] as? NSError, underlyingError.domain == NSPOSIXErrorDomain, underlyingError.code == EINTR else { fatalError("\(error)") } // Ok, we'll continue } } guard let realFiles = files else { fatalError("Hit EINTR 1000 times!") } let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase return realFiles.filter { $0.pathExtension == "json" }.flatMap { file -> [StructuredHeaderTestFixture] in let content = try! Data(contentsOf: file, options: [.uncached, .mappedIfSafe]) return try! decoder.decode([StructuredHeaderTestFixture].self, from: content) } } } struct StructuredHeaderTestFixture: Decodable { /// The name of this test. var name: String /// The list of header fields that should be parsed. Not present if this is a serialization test. var raw: [String]? /// The type to use to parse the fields var headerType: String /// The expected data structure to be produced. Note that this is stored as a serialized JSON object: /// this is because the shape of this data structure varies from test-case to test-case, so we can't /// incorporate it into the type system. This type is also preventing us from using Codable here: we just /// don't know what the heck we're expecting to see. var expected: JSONSchema? /// Whether this test is required to fail. var mustFail: Bool? /// Whether this test is allowed to fail. var canFail: Bool? /// The canonical form if the field value, if different from raw. Not applicable if `mustFail` is `true`. var canonical: [String]? } /// This defines the JSON types that can be used to encode structured headers. It allows us to express the expected outcome of /// a parse in a type-safe way. enum JSONSchema: Decodable { case dictionary([String: JSONSchema]) case array([JSONSchema]) case integer(Int64) case double(Double) case string(String) case bool(Bool) init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if let value = try? container.decode(String.self) { self = .string(value) } else if let bool = try? container.decode(Bool.self) { self = .bool(bool) } else if let value = try? container.decode(Int64.self) { self = .integer(value) } else if let value = try? container.decode(Double.self) { self = .double(value) } else if let value = try? container.decode([String: JSONSchema].self) { self = .dictionary(value) } else if let value = try? container.decode([JSONSchema].self) { self = .array(value) } else { preconditionFailure("Failed to decode at \(container.codingPath)") } } var isArray: Bool { switch self { case .array: return true case .dictionary, .integer, .double, .string, .bool: return false } } } ================================================ FILE: Tests/StructuredFieldValuesTests/StructuredFieldDecoderTests.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues import StructuredFieldValues import XCTest struct ListyDictionaryFieldParameters: Codable, Equatable { var q: Double? var fallback: String? } struct ListyDictionaryParameterisedString: Codable, Equatable { var item: String var parameters: ListyDictionaryFieldParameters } struct ListyDictionaryParameterisedList: Codable, Equatable { var items: [ListyDictionaryParameterisedString] var parameters: ListyDictionaryFieldParameters } struct ItemField: StructuredFieldValue, Equatable { static var structuredFieldType: StructuredFieldType { .item } var item: Base init(_ item: Base) { self.item = item } } struct List: StructuredFieldValue, Equatable { static var structuredFieldType: StructuredFieldType { .list } var items: [Base] init(_ items: [Base]) { self.items = items } } struct DictionaryField: StructuredFieldValue, Equatable { static var structuredFieldType: StructuredFieldType { .dictionary } var items: [Key: Value] init(_ items: [Key: Value]) { self.items = items } func encode(to encoder: Encoder) throws { try self.items.encode(to: encoder) } init(from decoder: Decoder) throws { self.items = try .init(from: decoder) } } /// An example ListyDictionary structured header field. /// /// An example of this field is: 'primary=bar;q=1.0, secondary=baz;q=0.5;fallback=last, acceptablejurisdictions=(AU;q=1.0 GB;q=0.9 FR);fallback=primary' struct ListyDictionaryField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var primary: ListyDictionaryParameterisedString var secondary: ListyDictionaryParameterisedString var acceptablejurisdictions: ListyDictionaryParameterisedList } final class StructuredFieldDecoderTests: XCTestCase { func testSimpleCodableDecode() throws { let headerField = "primary=bar;q=1.0, secondary=baz;q=0.5;fallback=last, acceptablejurisdictions=(AU;q=1.0 GB;q=0.9 FR);fallback=\"primary\"" let parsed = try StructuredFieldValueDecoder().decode(ListyDictionaryField.self, from: Array(headerField.utf8)) let expected = ListyDictionaryField( primary: .init(item: "bar", parameters: .init(q: 1, fallback: nil)), secondary: .init(item: "baz", parameters: .init(q: 0.5, fallback: "last")), acceptablejurisdictions: .init( items: [ .init(item: "AU", parameters: .init(q: 1, fallback: nil)), .init(item: "GB", parameters: .init(q: 0.9, fallback: nil)), .init(item: "FR", parameters: .init(q: nil, fallback: nil)), ], parameters: .init(q: nil, fallback: "primary") ) ) XCTAssertEqual(parsed, expected) } func testCanDecodeParameterisedItemsWithoutParameters() throws { struct ListyDictionaryNoParams: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var primary: String var secondary: String var acceptablejurisdictions: [String] } let headerField = "primary=bar;q=1.0, secondary=baz;q=0.5;fallback=last, acceptablejurisdictions=(AU;q=1.0 GB;q=0.9 FR);fallback=\"primary\"" let parsed = try StructuredFieldValueDecoder().decode( ListyDictionaryNoParams.self, from: Array(headerField.utf8) ) let expected = ListyDictionaryNoParams( primary: "bar", secondary: "baz", acceptablejurisdictions: ["AU", "GB", "FR"] ) XCTAssertEqual(parsed, expected) } func testCanDecodeIntegersInVariousWays() throws { let headerField = "5;bar=baz" XCTAssertEqual(ItemField(UInt8(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Int8(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(UInt16(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Int16(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(UInt32(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Int32(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(UInt64(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Int64(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(UInt(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Int(5)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) } func testOutOfRangeNumbersAreReported() throws { // Most-negative supported integer value is -999,999,999,999,999. This will fit into a // 64-bit integer, but no other integer type. Let's validate that this throws errors // rather than crashing for all non-Int64 types. (Ignoring Int/UInt due to their platform // dependence) let headerField = "-999999999999999;bar=baz" let expected = ItemField(Int64(-999_999_999_999_999)) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertEqual(expected, try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) } func testDoubleAndFloatInterchangeable() throws { let headerField = "5.0;bar=baz" XCTAssertEqual(ItemField(Float(5.0)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) XCTAssertEqual(ItemField(Double(5.0)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) } func testAskingForTheWrongType() throws { let headerField = "gzip" let intField = "5" XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(headerField.utf8)) ) XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(ItemField.self, from: Array(intField.utf8)) ) } func testDecodingTopLevelItemWithParameters() throws { struct IntWithParams: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: String] } let headerField = "5;bar=baz" let expected = IntWithParams(item: 5, parameters: ["bar": "baz"]) XCTAssertEqual(expected, try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) } func testDecodingTopLevelList() throws { let headerField = "foo, bar, baz" let expected = List(["foo", "bar", "baz"]) XCTAssertEqual(expected, try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8))) } func testDecodingLowercaseKeyStrategy() throws { struct Camel: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var hasHump: Bool } let headerField = "hashump" let expected = Camel(hasHump: true) var decoder = StructuredFieldValueDecoder() decoder.keyDecodingStrategy = .lowercase XCTAssertEqual(expected, try decoder.decode(from: Array(headerField.utf8))) } func testDecodingLowercaseKeyStrategyParameters() throws { struct CamelParameters: Codable, Equatable { var hasHump: Bool } struct Camel: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: String var parameters: CamelParameters } let headerField = "dromedary;hashump" let expected = Camel(item: "dromedary", parameters: .init(hasHump: true)) var decoder = StructuredFieldValueDecoder() decoder.keyDecodingStrategy = .lowercase XCTAssertEqual(expected, try decoder.decode(from: Array(headerField.utf8))) } func testDecodingKeyMissingFromDictionary() throws { struct MissingKey: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary var foo: Int } let headerField = "bar=baz" XCTAssertThrowsError(try StructuredFieldValueDecoder().decode(MissingKey.self, from: Array(headerField.utf8))) } func testDecodingKeyAsItemWantedInnerList() throws { struct MissingInnerList: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary var innerlist: [String] } let headerField = "innerlist=x" XCTAssertThrowsError( try StructuredFieldValueDecoder().decode(MissingInnerList.self, from: Array(headerField.utf8)) ) } func testDecodingBinaryAsTopLevelData() throws { let headerField = ":AQIDBA==:" XCTAssertEqual( ItemField(Data([1, 2, 3, 4])), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingBinaryAsParameterisedData() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Data var parameters: [String: Float] } let headerFieldNoParameters = ":AQIDBA==:" let headerFieldParameters = ":AQIDBA==:;q=0.8" XCTAssertEqual( Item(item: Data([1, 2, 3, 4]), parameters: [:]), try StructuredFieldValueDecoder().decode(Item.self, from: Array(headerFieldNoParameters.utf8)) ) XCTAssertEqual( Item(item: Data([1, 2, 3, 4]), parameters: ["q": 0.8]), try StructuredFieldValueDecoder().decode(Item.self, from: Array(headerFieldParameters.utf8)) ) } func testDecodingBinaryInParameterField() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: Data] } let headerField = "1;q=:AQIDBA==:" XCTAssertEqual( Item(item: 1, parameters: ["q": Data([1, 2, 3, 4])]), try StructuredFieldValueDecoder().decode(Item.self, from: Array(headerField.utf8)) ) } func testDecodingBinaryInOuterListRaw() throws { let headerField = ":AQIDBA==:, :BQYHCA==:" XCTAssertEqual( List([Data([1, 2, 3, 4]), Data([5, 6, 7, 8])]), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingBinaryInOuterListKeyed() throws { let headerField = ":AQIDBA==:, :BQYHCA==:" XCTAssertEqual( List([Data([1, 2, 3, 4]), Data([5, 6, 7, 8])]), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingBinaryInInnerListRaw() throws { let headerField = "(:AQIDBA==: :BQYHCA==:), (:AQIDBA==: :BQYHCA==:)" XCTAssertEqual( List(Array(repeating: [Data([1, 2, 3, 4]), Data([5, 6, 7, 8])], count: 2)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingBinaryInInnerListKeyed() throws { struct ListField: Codable, Equatable { var items: [Data] var parameters: [String: Bool] } let headerField = "(:AQIDBA==: :BQYHCA==:);foo, (:AQIDBA==: :BQYHCA==:);foo" XCTAssertEqual( List( Array( repeating: ListField(items: [Data([1, 2, 3, 4]), Data([5, 6, 7, 8])], parameters: ["foo": true]), count: 2 ) ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingBinaryInDictionaries() throws { struct DictionaryField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var bin: Data var box: Data } let headerField = "bin=:AQIDBA==:, box=:AQIDBA==:" XCTAssertEqual( DictionaryField(bin: Data([1, 2, 3, 4]), box: Data([1, 2, 3, 4])), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDecimalAsTopLevelData() throws { let headerField = "987654321.123" XCTAssertEqual( ItemField(Decimal(string: "987654321.123")!), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDecimalAsParameterisedData() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Decimal var parameters: [String: Float] } let headerFieldNoParameters = "987654321.123" let headerFieldParameters = "987654321.123;q=0.8" XCTAssertEqual( Item(item: Decimal(string: "987654321.123")!, parameters: [:]), try StructuredFieldValueDecoder().decode(from: Array(headerFieldNoParameters.utf8)) ) XCTAssertEqual( Item(item: Decimal(string: "987654321.123")!, parameters: ["q": 0.8]), try StructuredFieldValueDecoder().decode(from: Array(headerFieldParameters.utf8)) ) } func testDecodingDecimalInParameterField() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: Decimal] } let headerField = "1;q=987654321.123" XCTAssertEqual( Item(item: 1, parameters: ["q": Decimal(string: "987654321.123")!]), try StructuredFieldValueDecoder().decode(Item.self, from: Array(headerField.utf8)) ) } func testDecodingDecimalInOuterListRaw() throws { let headerField = "987654321.123, 123456789.321" XCTAssertEqual( List([Decimal(string: "987654321.123")!, Decimal(string: "123456789.321")!]), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDecimalInInnerListRaw() throws { let headerField = "(987654321.123 123456789.321), (987654321.123 123456789.321)" XCTAssertEqual( List(Array(repeating: [Decimal(string: "987654321.123")!, Decimal(string: "123456789.321")!], count: 2)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDecimalInInnerListKeyed() throws { struct ListField: Codable, Equatable { var items: [Decimal] var parameters: [String: Bool] } let headerField = "(987654321.123 123456789.321);foo, (987654321.123 123456789.321);foo" XCTAssertEqual( List( Array( repeating: ListField( items: [Decimal(string: "987654321.123")!, Decimal(string: "123456789.321")!], parameters: ["foo": true] ), count: 2 ) ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDecimalInDictionaries() throws { struct DictionaryField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var bin: Decimal var box: Decimal } let headerField = "bin=987654321.123, box=123456789.321" XCTAssertEqual( DictionaryField(bin: Decimal(string: "987654321.123")!, box: Decimal(string: "123456789.321")!), try StructuredFieldValueDecoder().decode(DictionaryField.self, from: Array(headerField.utf8)) ) } func testDecodingDateAsTopLevelData() throws { let headerField = "@4294967296" XCTAssertEqual( ItemField(Date(timeIntervalSince1970: 4_294_967_296)), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDateAsParameterisedData() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Date var parameters: [String: Float] } let headerFieldNoParameters = "@4294967296" let headerFieldParameters = "@4294967296;q=0.8" XCTAssertEqual( Item( item: Date(timeIntervalSince1970: 4_294_967_296), parameters: [:] ), try StructuredFieldValueDecoder().decode( Item.self, from: Array(headerFieldNoParameters.utf8) ) ) XCTAssertEqual( Item(item: Date(timeIntervalSince1970: 4_294_967_296), parameters: ["q": 0.8]), try StructuredFieldValueDecoder().decode( Item.self, from: Array(headerFieldParameters.utf8) ) ) } func testDecodingDateInParameterField() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: Date] } let headerField = "1;q=@4294967296" XCTAssertEqual( Item(item: 1, parameters: ["q": Date(timeIntervalSince1970: 4_294_967_296)]), try StructuredFieldValueDecoder().decode(Item.self, from: Array(headerField.utf8)) ) } func testDecodingDateInOuterListRaw() throws { let headerField = "@4294967296, @-1659578233" XCTAssertEqual( List( [ Date(timeIntervalSince1970: 4_294_967_296), Date(timeIntervalSince1970: -1_659_578_233), ] ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDateInInnerListRaw() throws { let headerField = "(@4294967296 @-1659578233), (@4294967296 @-1659578233)" XCTAssertEqual( List( Array( repeating: [ Date(timeIntervalSince1970: 4_294_967_296), Date(timeIntervalSince1970: -1_659_578_233), ], count: 2 ) ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDateInInnerListKeyed() throws { struct ListField: Codable, Equatable { var items: [Date] var parameters: [String: Bool] } let headerField = "(@4294967296 @-1659578233);foo, (@4294967296 @-1659578233);foo" XCTAssertEqual( List( Array( repeating: ListField( items: [ Date(timeIntervalSince1970: 4_294_967_296), Date(timeIntervalSince1970: -1_659_578_233), ], parameters: ["foo": true] ), count: 2 ) ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDateInDictionaries() throws { struct DictionaryField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var bin: Date var box: Date } let headerField = "bin=@4294967296, box=@-1659578233" XCTAssertEqual( DictionaryField( bin: Date(timeIntervalSince1970: 4_294_967_296), box: Date(timeIntervalSince1970: -1_659_578_233) ), try StructuredFieldValueDecoder().decode(from: Array(headerField.utf8)) ) } func testDecodingDisplayStringAsTopLevelData() throws { XCTAssertEqual( ItemField(DisplayString(rawValue: "füü")), try StructuredFieldValueDecoder().decode(from: Array("%\"f%c3%bc%c3%bc\"".utf8)) ) } func testDecodingDisplayStringAsParameterisedData() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: DisplayString var parameters: [String: Float] } XCTAssertEqual( Item( item: DisplayString(rawValue: "füü"), parameters: [:] ), try StructuredFieldValueDecoder().decode( Item.self, from: Array("%\"f%c3%bc%c3%bc\"".utf8) ) ) XCTAssertEqual( Item(item: DisplayString(rawValue: "füü"), parameters: ["q": 0.8]), try StructuredFieldValueDecoder().decode( Item.self, from: Array("%\"f%c3%bc%c3%bc\";q=0.8".utf8) ) ) } func testDecodingDisplayStringInParameterField() throws { struct Item: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: DisplayString] } XCTAssertEqual( Item(item: 1, parameters: ["q": DisplayString(rawValue: "füü")]), try StructuredFieldValueDecoder().decode( Item.self, from: Array("1;q=%\"f%c3%bc%c3%bc\"".utf8) ) ) } func testDecodingDisplayStringInOuterListRaw() throws { XCTAssertEqual( List( [ DisplayString(rawValue: "füü"), DisplayString(rawValue: "foo \"bar\" \\ baz"), ] ), try StructuredFieldValueDecoder().decode( from: Array("%\"f%c3%bc%c3%bc\", %\"foo %22bar%22 \\ baz\"".utf8) ) ) } func testDecodingDisplayStringInInnerListRaw() throws { XCTAssertEqual( List( Array( repeating: [ DisplayString(rawValue: "füü"), DisplayString(rawValue: "foo \"bar\" \\ baz"), ], count: 2 ) ), try StructuredFieldValueDecoder().decode( from: Array( """ (%\"f%c3%bc%c3%bc\" %\"foo %22bar%22 \\ baz\"), (%\"f%c3%bc%c3%bc\" %\"foo \ %22bar%22 \\ baz\") """.utf8 ) ) ) } func testDecodingDisplayStringInInnerListKeyed() throws { struct ListField: Codable, Equatable { var items: [DisplayString] var parameters: [String: Bool] } XCTAssertEqual( List( Array( repeating: ListField( items: [ DisplayString(rawValue: "füü"), DisplayString(rawValue: "foo \"bar\" \\ baz"), ], parameters: ["foo": true] ), count: 2 ) ), try StructuredFieldValueDecoder().decode( from: Array( """ (%\"f%c3%bc%c3%bc\" %\"foo %22bar%22 \\ baz\");foo, (%\"f%c3%bc%c3%bc\" %\"foo \ %22bar%22 \\ baz\");foo """.utf8 ) ) ) } func testDecodingDisplayStringInDictionaries() throws { struct DictionaryField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var bin: DisplayString var box: DisplayString } XCTAssertEqual( DictionaryField( bin: DisplayString(rawValue: "füü"), box: DisplayString(rawValue: "foo \"bar\" \\ baz") ), try StructuredFieldValueDecoder().decode( from: Array("bin=%\"f%c3%bc%c3%bc\", box=%\"foo %22bar%22 \\ baz\"".utf8) ) ) } } ================================================ FILE: Tests/StructuredFieldValuesTests/StructuredFieldEncoderTests.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues import StructuredFieldValues import XCTest // swift-format-ignore: DontRepeatTypeInStaticProperties final class StructuredFieldEncoderTests: XCTestCase { func testSimpleItemHeaderEncodeBareItem() throws { // We're going to try encoding a few bare items as item headers to confirm // that functions. let encoder = StructuredFieldValueEncoder() // Bool XCTAssertEqual(Array("?1".utf8), try encoder.encode(ItemField(true))) XCTAssertEqual(Array("?0".utf8), try encoder.encode(ItemField(false))) // String and token XCTAssertEqual(Array("\"hello, world\"".utf8), try encoder.encode(ItemField("hello, world"))) XCTAssertEqual(Array("gzip".utf8), try encoder.encode(ItemField("gzip"))) // Integer XCTAssertEqual(Array("10".utf8), try encoder.encode(ItemField(UInt8(10)))) XCTAssertEqual(Array("-10".utf8), try encoder.encode(ItemField(Int64(-10)))) // Decimal XCTAssertEqual(Array("102.2".utf8), try encoder.encode(ItemField(Float(102.2)))) XCTAssertEqual(Array("-166.66".utf8), try encoder.encode(ItemField(Double(-166.66)))) XCTAssertEqual(Array("987654321.123".utf8), try encoder.encode(ItemField(Decimal(string: "987654321.123")!))) XCTAssertEqual(Array("-123456789.321".utf8), try encoder.encode(ItemField(Decimal(string: "-123456789.321")!))) // Binary Data XCTAssertEqual(Array(":AQIDBA==:".utf8), try encoder.encode(ItemField(Data([1, 2, 3, 4])))) // Date XCTAssertEqual( Array("@4294967296".utf8), try encoder.encode(ItemField(Date(timeIntervalSince1970: 4_294_967_296))) ) XCTAssertEqual( Array("@-1659578233".utf8), try encoder.encode(ItemField(Date(timeIntervalSince1970: -1_659_578_233))) ) // Display String XCTAssertEqual( Array("%\"f%c3%bc%c3%bc\"".utf8), try encoder.encode(ItemField(DisplayString(rawValue: "füü"))) ) } func testEncodeKeyedItemHeader() throws { struct KeyedItem: Equatable, StructuredFieldValue { static var structuredFieldType: StructuredFieldType { .item } var item: ItemType var parameters: [String: Bool] } let encoder = StructuredFieldValueEncoder() // Bool XCTAssertEqual(Array("?1;x".utf8), try encoder.encode(KeyedItem(item: true, parameters: ["x": true]))) XCTAssertEqual(Array("?0;x=?0".utf8), try encoder.encode(KeyedItem(item: false, parameters: ["x": false]))) // String and token XCTAssertEqual( Array("\"hello, world\"".utf8), try encoder.encode(KeyedItem(item: "hello, world", parameters: [:])) ) XCTAssertEqual(Array("gzip;x".utf8), try encoder.encode(KeyedItem(item: "gzip", parameters: ["x": true]))) // Integer XCTAssertEqual(Array("10;x".utf8), try encoder.encode(KeyedItem(item: UInt16(10), parameters: ["x": true]))) XCTAssertEqual(Array("-10".utf8), try encoder.encode(KeyedItem(item: Int32(-10), parameters: [:]))) // Decimal XCTAssertEqual( Array("102.2;y=?0".utf8), try encoder.encode(KeyedItem(item: Float(102.2), parameters: ["y": false])) ) XCTAssertEqual(Array("-166.66".utf8), try encoder.encode(KeyedItem(item: Double(-166.66), parameters: [:]))) XCTAssertEqual( Array("987654321.123;y=?0".utf8), try encoder.encode(KeyedItem(item: Decimal(string: "987654321.123")!, parameters: ["y": false])) ) XCTAssertEqual( Array("-123456789.321".utf8), try encoder.encode(KeyedItem(item: Decimal(string: "-123456789.321")!, parameters: [:])) ) // Binary XCTAssertEqual( Array(":AQIDBA==:;y=?0".utf8), try encoder.encode(KeyedItem(item: Data([1, 2, 3, 4]), parameters: ["y": false])) ) XCTAssertEqual( Array(":AQIDBA==:".utf8), try encoder.encode(KeyedItem(item: Data([1, 2, 3, 4]), parameters: [:])) ) // Date XCTAssertEqual( Array("@4294967296;x".utf8), try encoder.encode( KeyedItem( item: Date(timeIntervalSince1970: 4_294_967_296), parameters: ["x": true] ) ) ) XCTAssertEqual( Array("@-1659578233".utf8), try encoder.encode( KeyedItem( item: Date(timeIntervalSince1970: -1_659_578_233), parameters: [:] ) ) ) // Display String XCTAssertEqual( Array("%\"f%c3%bc%c3%bc\";x".utf8), try encoder.encode( KeyedItem(item: DisplayString(rawValue: "füü"), parameters: ["x": true]) ) ) XCTAssertEqual( Array("%\"foo %22bar%22 \\ baz\"".utf8), try encoder.encode( KeyedItem(item: DisplayString(rawValue: "foo \"bar\" \\ baz"), parameters: [:]) ) ) } func testEncodeKeyedItemHeaderWithParamsAsStruct() throws { struct Parameters: Equatable, Codable { var x: Bool? var q: Float? } struct Field: Equatable, StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .item var item: String var parameters: Parameters } let encoder = StructuredFieldValueEncoder() XCTAssertEqual( Array("gzip;x;q=0.8".utf8), try encoder.encode(Field(item: "gzip", parameters: Parameters(x: true, q: 0.8))) ) XCTAssertEqual( Array("deflate;q=0.6".utf8), try encoder.encode(Field(item: "deflate", parameters: Parameters(x: nil, q: 0.6))) ) XCTAssertEqual( Array("zlib".utf8), try encoder.encode(Field(item: "zlib", parameters: Parameters(x: nil, q: nil))) ) } func testEncodeSimpleDictionary() throws { let encoder = StructuredFieldValueEncoder() struct DictionaryField: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary var x: Bool var y: Bool } let result = try encoder.encode(DictionaryField(x: true, y: false)) let possibilities = [Array("x, y=?0".utf8), Array("y=?0, x".utf8)] XCTAssertTrue(possibilities.contains(result), "\(possibilities) does not contain \(result)") } func testEncodeDictionaryOfParameterisedItems() throws { struct Field: Equatable, Codable { var item: Int var parameters: [String: Float] } struct DictionaryField: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary var x: Field } let encoder = StructuredFieldValueEncoder() XCTAssertEqual( Array("x=66;q=0.8".utf8), try encoder.encode(DictionaryField(x: Field(item: 66, parameters: ["q": 0.8]))) ) } func testSimpleListField() throws { let encoder = StructuredFieldValueEncoder() // Bool XCTAssertEqual( Array("?1, ?0, ?1".utf8), try encoder.encode(List([true, false, true])) ) // String and token XCTAssertEqual( Array("\"hello, world\", gzip".utf8), try encoder.encode(List(["hello, world", "gzip"])) ) // Integer XCTAssertEqual(Array("10, -10".utf8), try encoder.encode(List([Int16(10), Int16(-10)]))) // Decimal XCTAssertEqual(Array("102.2, -166.66".utf8), try encoder.encode(List([Float(102.2), Float(-166.66)]))) XCTAssertEqual( Array("123456789.321, -987654321.123".utf8), try encoder.encode(List([Decimal(string: "123456789.321")!, Decimal(string: "-987654321.123")!])) ) // Binary XCTAssertEqual( Array(":AQIDBA==:, :BQYHCA==:".utf8), try encoder.encode(List([Data([1, 2, 3, 4]), Data([5, 6, 7, 8])])) ) // Date XCTAssertEqual( Array("@4294967296, @-1659578233".utf8), try encoder.encode( List( [ Date(timeIntervalSince1970: 4_294_967_296), Date(timeIntervalSince1970: -1_659_578_233), ] ) ) ) // Display String XCTAssertEqual( Array("%\"f%c3%bc%c3%bc\", %\"foo %22bar%22 \\ baz\"".utf8), try encoder.encode( List( [DisplayString(rawValue: "füü"), DisplayString(rawValue: "foo \"bar\" \\ baz")] ) ) ) } func testListFieldInnerItemsWithDict() throws { struct Item: Equatable, Codable { var parameters: [String: Float] var item: String } let encoder = StructuredFieldValueEncoder() let header = [ Item(parameters: ["q": 0.8], item: "gzip"), Item(parameters: ["q": 0.6], item: "deflate"), ] XCTAssertEqual( Array("gzip;q=0.8, deflate;q=0.6".utf8), try encoder.encode(List(header)) ) } func testListFieldInnerItemsWithObject() throws { struct Parameters: Equatable, Codable { var q: Float? } struct Item: Equatable, Codable { var item: String var parameters: Parameters } let encoder = StructuredFieldValueEncoder() let header = [ Item(item: "gzip", parameters: Parameters(q: 0.8)), Item(item: "deflate", parameters: Parameters(q: nil)), ] XCTAssertEqual( Array("gzip;q=0.8, deflate".utf8), try encoder.encode(List(header)) ) } func testListFieldInnerListsBare() throws { let encoder = StructuredFieldValueEncoder() let header = [[1, 2, 3], [4, 5, 6]] XCTAssertEqual(Array("(1 2 3), (4 5 6)".utf8), try encoder.encode(List(header))) } func testListFieldInnerListsParameters() throws { struct Integers: Equatable, Codable { var items: [Int] var parameters: [String: String] } let encoder = StructuredFieldValueEncoder() let header = [ Integers(items: [1, 2, 3], parameters: ["early": "yes"]), Integers(items: [4, 5, 6], parameters: ["early": "no"]), ] XCTAssertEqual(Array("(1 2 3);early=yes, (4 5 6);early=no".utf8), try encoder.encode(List(header))) } func testListFieldInnerListElementsWithParameters() throws { struct Item: Equatable, Codable { var item: Int var parameters: [String: Bool] } let encoder = StructuredFieldValueEncoder() let header = [ [ Item(item: 1, parameters: ["odd": true]), Item(item: 2, parameters: ["odd": false]), ], [ Item(item: 3, parameters: ["odd": true]), Item(item: 4, parameters: ["odd": false]), ], ] XCTAssertEqual( Array("(1;odd 2;odd=?0), (3;odd 4;odd=?0)".utf8), try encoder.encode(List(header)) ) } func testListFieldExplicitInnerListsWithItemsWithParameters() throws { struct ItemParams: Equatable, Codable { var q: Float } struct Item: Equatable, Codable { var item: String var parameters: ItemParams } struct FieldParams: Equatable, Codable { var sorted: Bool } struct Fields: Equatable, Codable { var items: [Item] var parameters: FieldParams } let encoder = StructuredFieldValueEncoder() let header = [ Fields( items: [ Item(item: "gzip", parameters: ItemParams(q: 0.8)), Item(item: "deflate", parameters: ItemParams(q: 0.6)), ], parameters: FieldParams(sorted: true) ), Fields( items: [ Item(item: "zlib", parameters: ItemParams(q: 0.4)), Item(item: "br", parameters: ItemParams(q: 1.0)), ], parameters: FieldParams(sorted: false) ), ] XCTAssertEqual( Array("(gzip;q=0.8 deflate;q=0.6);sorted, (zlib;q=0.4 br;q=1.0);sorted=?0".utf8), try encoder.encode(List(header)) ) } func testDictionaryFieldWithSimpleInnerLists() throws { struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var name: String var color: String? var intensity: [Float] } let encoder = StructuredFieldValueEncoder() XCTAssertEqual( Array("name=red, intensity=(1.0 0.0 0.0)".utf8), try encoder.encode(Field(name: "red", color: nil, intensity: [1.0, 0.0, 0.0])) ) } func testDictionaryFieldWithComplexInnerLists() throws { struct ColorParameters: Codable, Equatable { var name: String? } struct Color: Codable, Equatable { var items: [Float] var parameters: ColorParameters } struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .dictionary var green: Color } let encoder = StructuredFieldValueEncoder() let field = Field( green: Color(items: [0.0, 1.0, 0.0], parameters: ColorParameters(name: "green")) ) XCTAssertEqual( Array("green=(0.0 1.0 0.0);name=green".utf8), try encoder.encode(field) ) } func testEmptyListField() throws { let encoder = StructuredFieldValueEncoder() XCTAssertEqual([], try encoder.encode(List([] as [Int]))) } func testEmptyDictionaryField() throws { struct Field: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary } let encoder = StructuredFieldValueEncoder() XCTAssertEqual([], try encoder.encode(Field())) } func testEmptyItemField() throws { struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int? } let encoder = StructuredFieldValueEncoder() XCTAssertEqual([], try encoder.encode(Field(item: nil))) XCTAssertThrowsError(try encoder.encode(List([Field(item: nil)]))) XCTAssertThrowsError(try encoder.encode(DictionaryField(["x": Field(item: nil)]))) } func testForbidEmptyItemWithActualParameters() throws { struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int? var parameters: [String: Int] } let encoder = StructuredFieldValueEncoder() let badField = Field(item: nil, parameters: ["x": 0]) XCTAssertThrowsError(try encoder.encode(badField)) XCTAssertThrowsError(try encoder.encode(List([badField]))) XCTAssertThrowsError(try encoder.encode(DictionaryField(["x": badField]))) } func testForbidItemWithExtraField() throws { struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: [String: Int] var other: Bool } let encoder = StructuredFieldValueEncoder() let badField = Field(item: 1, parameters: ["x": 0], other: true) XCTAssertThrowsError(try encoder.encode(badField)) XCTAssertThrowsError(try encoder.encode(List([badField]))) XCTAssertThrowsError(try encoder.encode(DictionaryField(["x": badField]))) } func testForbidJustParameters() throws { struct Field: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var parameters: [String: Int] } let encoder = StructuredFieldValueEncoder() let badField = Field(parameters: ["x": 0]) XCTAssertThrowsError(try encoder.encode(badField)) XCTAssertThrowsError(try encoder.encode(List([badField]))) XCTAssertThrowsError(try encoder.encode(DictionaryField(["x": badField]))) } func testForbidNullInnerList() throws { struct Field: Codable, Equatable { var items: Int? } let encoder = StructuredFieldValueEncoder() XCTAssertThrowsError(try encoder.encode(List([Field(items: nil)]))) XCTAssertThrowsError(try encoder.encode(DictionaryField(["x": Field(items: nil)]))) } func testLowercaseKeysOnDictionaries() throws { struct DictionaryField: StructuredFieldValue { static let structuredFieldType: StructuredFieldType = .dictionary var allowAll: Bool } let noStrategyEncoder = StructuredFieldValueEncoder() XCTAssertThrowsError(try noStrategyEncoder.encode(DictionaryField(allowAll: false))) var lowercaseEncoder = noStrategyEncoder lowercaseEncoder.keyEncodingStrategy = .lowercase XCTAssertEqual( Array("allowall".utf8), try lowercaseEncoder.encode(DictionaryField(allowAll: true)) ) } func testLowercaseKeysOnParameters() throws { struct Parameters: Codable, Equatable { var allowAll: Bool } struct ItemField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .item var item: Int var parameters: Parameters } struct ListField: StructuredFieldValue, Equatable { static let structuredFieldType: StructuredFieldType = .list var items: [Int] var parameters: Parameters } let noStrategyEncoder = StructuredFieldValueEncoder() var lowercaseEncoder = noStrategyEncoder lowercaseEncoder.keyEncodingStrategy = .lowercase let item = ItemField(item: 1, parameters: Parameters(allowAll: true)) let list = ListField(items: [1, 2], parameters: Parameters(allowAll: true)) XCTAssertThrowsError(try noStrategyEncoder.encode(item)) XCTAssertEqual(Array("1;allowall".utf8), try lowercaseEncoder.encode(item)) XCTAssertThrowsError(try noStrategyEncoder.encode(List([item, item]))) XCTAssertEqual( Array("1;allowall, 1;allowall".utf8), try lowercaseEncoder.encode(List([item, item])) ) XCTAssertThrowsError(try noStrategyEncoder.encode(List([list]))) XCTAssertEqual( Array("(1 2);allowall".utf8), try lowercaseEncoder.encode(List([list])) ) XCTAssertThrowsError(try noStrategyEncoder.encode(DictionaryField(["item": item]))) XCTAssertEqual( Array("item=1;allowall".utf8), try lowercaseEncoder.encode(DictionaryField(["item": item])) ) XCTAssertThrowsError(try noStrategyEncoder.encode(DictionaryField(["list": list]))) XCTAssertEqual( Array("list=(1 2);allowall".utf8), try lowercaseEncoder.encode(DictionaryField(["list": list])) ) } } ================================================ FILE: Tests/StructuredFieldValuesTests/StructuredFieldParserTests.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues import XCTest enum FixtureTestError: Error { case base64DecodingFailed } final class StructuredFieldParserTests: XCTestCase { enum TestResult { case dictionary(OrderedMap) case list([ItemOrInnerList]) case item(Item) } private func _validateBareItem(_ bareItem: RFC9651BareItem, against schema: JSONSchema, fixtureName: String) throws { switch (bareItem, schema) { case (.integer(let baseInt), .integer(let jsonInt)): XCTAssertEqual(baseInt, jsonInt, "\(fixtureName): Got \(bareItem), expected \(schema)") case (.decimal(let baseDecimal), .double(let jsonDouble)): XCTAssertEqual( String(baseDecimal), String(jsonDouble), "\(fixtureName): Got \(bareItem), expected \(schema)" ) case (.decimal(let baseDecimal), .integer(let jsonInteger)): // Due to limits of Foundation's JSONSerialization, we can get types that decode as integers but are actually decimals. // We just cannot tell the difference here, so we tolerate this flexibility. XCTAssertEqual( Double(baseDecimal), Double(jsonInteger), "\(fixtureName): Got \(bareItem), expected \(schema)" ) case (.string(let baseString), .string(let jsonString)): XCTAssertEqual(baseString, jsonString, "\(fixtureName): Got \(bareItem), expected \(schema)") case (.token(let token), .dictionary(let typeDictionary)): guard typeDictionary.count == 2, case .string(let typeName) = typeDictionary["__type"], case .string(let typeValue) = typeDictionary["value"] else { XCTFail("\(fixtureName): Unexpected type dict \(typeDictionary)") return } XCTAssertEqual(typeName, "token", "\(fixtureName): Expected type token, got type \(typeName)") XCTAssertEqual(typeValue, token, "\(fixtureName): Got \(token), expected \(typeValue)") case (.undecodedByteSequence(let binary), .dictionary(let typeDictionary)): guard typeDictionary.count == 2, case .string(let typeName) = typeDictionary["__type"], case .string(let typeValue) = typeDictionary["value"] else { XCTFail("\(fixtureName): Unexpected type dict \(typeDictionary)") return } XCTAssertEqual(typeName, "binary", "\(fixtureName): Expected type binary, got type \(typeName)") guard let decodedValue = Data(base64Encoded: binary) else { throw FixtureTestError.base64DecodingFailed } let decodedExpected = Data(base32Encoded: Data(typeValue.utf8)) XCTAssertEqual( decodedValue, decodedExpected, "\(fixtureName): Got \(Array(decodedValue)), expected \(Array(decodedExpected))" ) case (.bool(let baseBool), .bool(let expectedBool)): XCTAssertEqual(baseBool, expectedBool, "\(fixtureName): Got \(baseBool), expected \(expectedBool)") case (.date(let baseDate), .dictionary(let typeDictionary)): guard typeDictionary.count == 2, case .string(let typeName) = typeDictionary["__type"], case .integer(let typeValue) = typeDictionary["value"] else { XCTFail("\(fixtureName): Unexpected type dict \(typeDictionary)") return } XCTAssertEqual(typeName, "date", "\(fixtureName): Expected type date, got type \(typeName)") XCTAssertEqual(typeValue, baseDate, "\(fixtureName): Got \(baseDate), expected \(typeValue)") case (.displayString(let baseDisplayString), .dictionary(let typeDictionary)): guard typeDictionary.count == 2, case .string(let typeName) = typeDictionary["__type"], case .string(let typeValue) = typeDictionary["value"] else { XCTFail("\(fixtureName): Unexpected type dict \(typeDictionary)") return } XCTAssertEqual( typeName, "displaystring", "\(fixtureName): Expected type displaystring, got type \(typeName)" ) XCTAssertEqual( typeValue, baseDisplayString, "\(fixtureName): Got \(baseDisplayString), expected \(typeValue)" ) default: XCTFail("\(fixtureName): Got \(bareItem), expected \(schema)") } } private func _validateParameters( _ parameters: OrderedMap, against schema: JSONSchema, fixtureName: String ) throws { guard case .dictionary(let expectedParameters) = schema else { XCTFail("\(fixtureName): Expected parameters to be a JSON dictionary, but got \(schema)") return } XCTAssertEqual( expectedParameters.count, parameters.count, "\(fixtureName): Different numbers of parameters: expected \(expectedParameters), got \(parameters)" ) for (name, value) in parameters { guard let expectedValue = expectedParameters[name] else { XCTFail("\(fixtureName): Did not contain parameter for \(name)") return } try self._validateBareItem(value, against: expectedValue, fixtureName: fixtureName) } } private func _validateItem(_ item: Item, against schema: JSONSchema, fixtureName: String) throws { // Item: JSON array with two elements, the Bare-Item and Parameters guard case .array(let arrayElements) = schema, arrayElements.count == 2 else { XCTFail("\(fixtureName): Unexpected item: got \(item), expected \(schema)") return } // First, match the item. try self._validateBareItem(item.rfc9651BareItem, against: arrayElements.first!, fixtureName: fixtureName) // Now the parameters. try self._validateParameters(item.rfc9651Parameters, against: arrayElements.last!, fixtureName: fixtureName) } private func _validateInnerList(_ innerList: InnerList, against schema: JSONSchema, fixtureName: String) throws { guard case .array(let arrayElements) = schema, arrayElements.count == 2, case .some(.array(let expectedItems)) = arrayElements.first, let expectedParameters = arrayElements.last else { XCTFail("\(fixtureName): Unexpected inner list: got \(innerList), expected \(schema)") return } XCTAssertEqual( expectedItems.count, innerList.bareInnerList.count, "\(fixtureName): Unexpected inner list items: expected \(expectedItems), got \(innerList.bareInnerList)" ) for (actualItem, expectedItem) in zip(innerList.bareInnerList, expectedItems) { try self._validateItem(actualItem, against: expectedItem, fixtureName: fixtureName) } try self._validateParameters(innerList.rfc9651Parameters, against: expectedParameters, fixtureName: fixtureName) } private func _validateList(_ result: [ItemOrInnerList], against schema: JSONSchema, fixtureName: String) throws { guard case .array(let arrayElements) = schema else { XCTFail("\(fixtureName): Unexpected list: got \(result), expected \(schema)") return } XCTAssertEqual( arrayElements.count, result.count, "\(fixtureName): Different counts in list: got \(result), expected \(arrayElements)" ) for (innerResult, expectedElement) in zip(result, arrayElements) { switch innerResult { case .innerList(let innerList): try self._validateInnerList(innerList, against: expectedElement, fixtureName: fixtureName) case .item(let item): try self._validateItem(item, against: expectedElement, fixtureName: fixtureName) } } } private func _validateDictionary( _ result: OrderedMap, against schema: JSONSchema, fixtureName: String ) throws { guard case .dictionary(let expectedElements) = schema else { XCTFail("\(fixtureName): Unexpected dictionary: got \(result), expected \(schema)") return } XCTAssertEqual( expectedElements.count, result.count, "\(fixtureName): Different counts in dictionary: got \(result), expected \(expectedElements)" ) for (key, value) in result { guard let expectedEntry = expectedElements[key] else { XCTFail("\(fixtureName): Could not find \(key) in \(expectedElements)") return } switch value { case .innerList(let innerList): try self._validateInnerList(innerList, against: expectedEntry, fixtureName: fixtureName) case .item(let item): try self._validateItem(item, against: expectedEntry, fixtureName: fixtureName) } } } private func _validateFixtureResult(_ result: TestResult, against schema: JSONSchema, fixtureName: String) throws { // We want to recursively validate the result here. switch result { case .list(let resultItems): try self._validateList(resultItems, against: schema, fixtureName: fixtureName) case .dictionary(let resultDictionary): try self._validateDictionary(resultDictionary, against: schema, fixtureName: fixtureName) case .item(let resultItem): // Items have a specific format, but we have a helper for it. try self._validateItem(resultItem, against: schema, fixtureName: fixtureName) } } private func _runTestOnFixture(_ fixture: StructuredHeaderTestFixture) { // Temporary join here for now, we may want to use a fancy collection at some point. guard let raw = fixture.raw else { // Serialization only test, skip. return } let joinedHeaders = Array(raw.joined(separator: ", ").utf8) do { var parser = StructuredFieldValueParser(joinedHeaders) let testResult: TestResult switch fixture.headerType { case "dictionary": testResult = try .dictionary(parser.parseDictionaryFieldValue()) case "list": testResult = try .list(parser.parseListFieldValue()) case "item": testResult = try .item(parser.parseItemFieldValue()) default: XCTFail("\(fixture.name): Unexpected header type \(fixture.headerType)") return } // If we got here, but we were supposed to error, we should error. if fixture.mustFail == true { XCTFail("\(fixture.name): Fixture must fail, but parse succeeded") return } // We allow this function to throw. It may only throw in cases where the test is allowed to fail, // so we police it under the same rules. In this case, we do some extra policing to confirm we only // tolerate the appropriate kinds of errors. // This force-unwrap is safe, expected can only be nil if mustFail is true. do { try self._validateFixtureResult(testResult, against: fixture.expected!, fixtureName: fixture.name) } catch let error as FixtureTestError { throw error } catch { XCTFail("\(fixture.name): validator threw unexpected error \(error)") } } catch { // Throwing is fine if this test is allowed to or expected to fail. If it isn't, fail the test. guard fixture.mustFail == true || fixture.canFail == true else { XCTFail("\(fixture.name): Fixture threw unexpected error \(error)") return } } } func testCanPassAllFixtures() throws { // This is a bulk-test: we run across all the fixtures in the fixtures directory to confirm we can handle all of them. for fixture in FixturesLoader.parsingFixtures { self._runTestOnFixture(fixture) } } } ================================================ FILE: Tests/StructuredFieldValuesTests/StructuredFieldSerializerTests.swift ================================================ //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation import RawStructuredFieldValues import XCTest final class StructuredFieldSerializerTests: XCTestCase { enum TestResult { case dictionary(OrderedMap) case list([ItemOrInnerList]) case item(Item) } private func _runSerializationTest(_ fixture: StructuredHeaderTestFixture) { guard let expected = fixture.expected else { fatalError("No structure to serialize") } do { let toSerialize: TestResult do { toSerialize = try TestResult(expected) } catch let error as StructuredHeaderError where error == .invalidIntegerOrDecimal { // We expect this error, it's fine return } var serializer = StructuredFieldValueSerializer() let result: [UInt8] switch toSerialize { case .dictionary(let dictionary): result = try serializer.writeDictionaryFieldValue(dictionary) case .list(let list): result = try serializer.writeListFieldValue(list) case .item(let item): result = try serializer.writeItemFieldValue(item) } if fixture.mustFail == true || fixture.canFail == true { XCTFail("\(fixture.name): Fixture did not throw when serializing.") } else if let canonical = fixture.canonical { let expectedCanonicalForm = canonical.joined(separator: ", ") XCTAssertEqual( Array(expectedCanonicalForm.utf8), result, "\(fixture.name): Bad serialization, expected \(expectedCanonicalForm), got \(String(decoding: result, as: UTF8.self))" ) } } catch { XCTAssert( fixture.mustFail == true || fixture.canFail == true, "\(fixture.name): Unexpected failure, threw error \(error)" ) } } private func _runRoundTripTest(_ fixture: StructuredHeaderTestFixture) { guard let raw = fixture.raw else { fatalError("Cannot run round-trip test without raw header.") } let joinedHeaders = Array(raw.joined(separator: ", ").utf8) do { var parser = StructuredFieldValueParser(joinedHeaders) let testResult: TestResult switch fixture.headerType { case "dictionary": testResult = try .dictionary(parser.parseDictionaryFieldValue()) case "list": testResult = try .list(parser.parseListFieldValue()) case "item": testResult = try .item(parser.parseItemFieldValue()) default: XCTFail("\(fixture.name): Unexpected header type \(fixture.headerType)") return } var serializer = StructuredFieldValueSerializer() let serialized: [UInt8] let canonicalJoinedHeaders: [UInt8] if let canonical = fixture.canonical { canonicalJoinedHeaders = Array(canonical.joined(separator: ", ").utf8) } else { canonicalJoinedHeaders = joinedHeaders } switch testResult { case .dictionary(let result): serialized = try serializer.writeDictionaryFieldValue(result) case .list(let list): serialized = try serializer.writeListFieldValue(list) case .item(let item): serialized = try serializer.writeItemFieldValue(item) } XCTAssertEqual( canonicalJoinedHeaders, serialized, "\(fixture.name): Header serialization mismatch: expected \(String(decoding: canonicalJoinedHeaders, as: UTF8.self)), got \(String(decoding: serialized, as: UTF8.self))" ) } catch { XCTFail("\(fixture.name): Fixture threw unexpected error \(error)") } } func testCanPassAllParsingFixtures() throws { // This is a bulk-test: we run across all the fixtures in the fixtures directory to confirm we can handle all of them. for fixture in FixturesLoader.parsingFixtures { if fixture.mustFail != true, fixture.canFail != true { self._runRoundTripTest(fixture) } } } func testCanPassAllSerializationFixtures() throws { // This is a bulk-test: we run across all the fixtures in the fixtures directory to confirm we can handle all of them. for fixture in FixturesLoader.serializingFixtures { self._runSerializationTest(fixture) } } } extension StructuredFieldSerializerTests.TestResult { init(_ schema: JSONSchema) throws { switch schema { case .dictionary(let dictionary): // Top level JSON objects are encoding dictionaries. var dict = OrderedMap() for (name, value) in dictionary { dict[name] = try ItemOrInnerList(value) } self = .dictionary(dict) case .array(let jsonArray): // Top level JSON arrays may be either list headers or item headers. To know, we have // to investigate a bit. An item will have only two entries, and neither will be an array. if jsonArray.count == 2, let first = jsonArray.first, let last = jsonArray.last, !first.isArray, !last.isArray { // This is an item! self = .item(try Item(schema)) } else { self = .list(try jsonArray.map { try ItemOrInnerList($0) }) } case .bool, .double, .integer, .string: fatalError("Invalid top-level JSON object \(schema)") } } } extension ItemOrInnerList { init(_ schema: JSONSchema) throws { // We need to detect the difference between an item or inner list. Both will be JSON arrays, but // in the case of inner list the first element will be an array, while for an item it will not. guard case .array(let arrayElements) = schema, arrayElements.count == 2, let first = arrayElements.first else { fatalError("Invalid item or inner list: \(schema)") } if case .array = first { self = .innerList(try InnerList(schema)) } else { self = .item(try Item(schema)) } } } extension Item { init(_ schema: JSONSchema) throws { guard case .array(let arrayElements) = schema, arrayElements.count == 2, let first = arrayElements.first, let last = arrayElements.last else { fatalError("Invalid item: \(schema)") } self.init(bareItem: try RFC9651BareItem(first), parameters: try OrderedMap(parameters: last)) } } extension RFC9651BareItem { init(_ schema: JSONSchema) throws { switch schema { case .integer(let int): self = .integer(int) case .double(let double): self = try .decimal(.init(double)) case .string(let string): self = .string(string) case .dictionary(let typeObject): switch (typeObject["__type"], typeObject["value"]) { case (.some(.string("token")), .some(.string(let value))): self = .token(value) case (.some(.string("binary")), .some(.string(let value))): let expectedBase64Bytes = Data(base32Encoded: Data(value.utf8)).base64EncodedString() self = .undecodedByteSequence(expectedBase64Bytes) case (.some(.string("date")), .some(.integer(let value))): self = .date(value) case (.some(.string("displaystring")), .some(.string(let value))): self = .displayString(value) default: preconditionFailure("Unexpected type object \(typeObject)") } case .bool(let bool): self = .bool(bool) case .array: preconditionFailure("Base item cannot be JSON array") } } } extension InnerList { init(_ schema: JSONSchema) throws { guard case .array(let arrayElements) = schema, arrayElements.count == 2, let first = arrayElements.first, let last = arrayElements.last else { fatalError("Invalid item: \(schema)") } self.init(bareInnerList: try BareInnerList(first), parameters: try OrderedMap(parameters: last)) } } extension BareInnerList { init(_ schema: JSONSchema) throws { guard case .array(let items) = schema else { fatalError("Unexpected bare inner list object \(schema)") } self.init() for element in items { self.append(try Item(element)) } } } extension OrderedMap where Key == String, Value == RFC9651BareItem { init(parameters: JSONSchema) throws { guard case .dictionary(let jsonDict) = parameters else { fatalError("Invalid format for parameters: \(parameters)") } self.init() for (name, value) in jsonDict { self[name] = try RFC9651BareItem(value) } } } ================================================ FILE: Tests/TestFixtures/binary.json ================================================ [ { "name": "basic binary", "raw": [":aGVsbG8=:"], "header_type": "item", "expected": [ {"__type": "binary", "value": "NBSWY3DP"}, {}] }, { "name": "empty binary", "raw": ["::"], "header_type": "item", "expected": [ {"__type": "binary", "value": ""}, {}] }, { "name": "bad paddding", "raw": [":aGVsbG8:"], "header_type": "item", "expected": [ {"__type": "binary", "value": "NBSWY3DP"}, {}], "can_fail": true, "canonical": [":aGVsbG8=:"] }, { "name": "bad end delimiter", "raw": [":aGVsbG8="], "header_type": "item", "must_fail": true }, { "name": "extra whitespace", "raw": [":aGVsb G8=:"], "header_type": "item", "must_fail": true }, { "name": "extra chars", "raw": [":aGVsbG!8=:"], "header_type": "item", "must_fail": true }, { "name": "suffix chars", "raw": [":aGVsbG8=!:"], "header_type": "item", "must_fail": true }, { "name": "non-zero pad bits", "raw": [":iZ==:"], "header_type": "item", "expected": [ {"__type": "binary", "value": "RE======"}, {}], "can_fail": true, "canonical": [":iQ==:"] }, { "name": "non-ASCII binary", "raw": [":/+Ah:"], "header_type": "item", "expected": [ {"__type": "binary", "value": "77QCC==="}, {}] }, { "name": "base64url binary", "raw": [":_-Ah:"], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/boolean.json ================================================ [ { "name": "basic true boolean", "raw": ["?1"], "header_type": "item", "expected": [true, {}] }, { "name": "basic false boolean", "raw": ["?0"], "header_type": "item", "expected": [false, {}] }, { "name": "unknown boolean", "raw": ["?Q"], "header_type": "item", "must_fail": true }, { "name": "whitespace boolean", "raw": ["? 1"], "header_type": "item", "must_fail": true }, { "name": "negative zero boolean", "raw": ["?-0"], "header_type": "item", "must_fail": true }, { "name": "T boolean", "raw": ["?T"], "header_type": "item", "must_fail": true }, { "name": "F boolean", "raw": ["?F"], "header_type": "item", "must_fail": true }, { "name": "t boolean", "raw": ["?t"], "header_type": "item", "must_fail": true }, { "name": "f boolean", "raw": ["?f"], "header_type": "item", "must_fail": true }, { "name": "spelled-out True boolean", "raw": ["?True"], "header_type": "item", "must_fail": true }, { "name": "spelled-out False boolean", "raw": ["?False"], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/date.json ================================================ [ { "name": "date - 1970-01-01 00:00:00", "raw": ["@0"], "header_type": "item", "expected": [{"__type": "date", "value": 0}, {}] }, { "name": "date - 2022-08-04 01:57:13", "raw": ["@1659578233"], "header_type": "item", "expected": [{"__type": "date", "value": 1659578233}, {}] }, { "name": "date - 1917-05-30 22:02:47", "raw": ["@-1659578233"], "header_type": "item", "expected": [{"__type": "date", "value": -1659578233}, {}] }, { "name": "date - 2^31", "raw": ["@2147483648"], "header_type": "item", "expected": [{"__type": "date", "value": 2147483648}, {}] }, { "name": "date - 2^32", "raw": ["@4294967296"], "header_type": "item", "expected": [{"__type": "date", "value": 4294967296}, {}] }, { "name": "date - decimal", "raw": ["@1659578233.12"], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/dictionary.json ================================================ [ { "name": "basic dictionary", "raw": ["en=\"Applepie\", da=:w4ZibGV0w6ZydGUK:"], "header_type": "dictionary", "expected": {"en": ["Applepie", {}], "da": [ {"__type": "binary", "value": "YODGE3DFOTB2M4TUMUFA===="}, {}] } }, { "name": "empty dictionary", "raw": [""], "header_type": "dictionary", "expected": {}, "canonical": [] }, { "name": "single item dictionary", "raw": ["a=1"], "header_type": "dictionary", "expected": {"a": [1, {}]} }, { "name": "list item dictionary", "raw": ["a=(1 2)"], "header_type": "dictionary", "expected": {"a": [[[1, {}], [2, {}]], {}]} }, { "name": "single list item dictionary", "raw": ["a=(1)"], "header_type": "dictionary", "expected": {"a": [[[1, {}]], {}]} }, { "name": "empty list item dictionary", "raw": ["a=()"], "header_type": "dictionary", "expected": {"a": [[], {}]} }, { "name": "no whitespace dictionary", "raw": ["a=1,b=2"], "header_type": "dictionary", "expected": {"a": [1, {}], "b": [2, {}]}, "canonical": ["a=1, b=2"] }, { "name": "extra whitespace dictionary", "raw": ["a=1 , b=2"], "header_type": "dictionary", "expected": {"a": [1, {}], "b": [2, {}]}, "canonical": ["a=1, b=2"] }, { "name": "tab separated dictionary", "raw": ["a=1\t,\tb=2"], "header_type": "dictionary", "expected": {"a": [1, {}], "b": [2, {}]}, "canonical": ["a=1, b=2"] }, { "name": "leading whitespace dictionary", "raw": [" a=1 , b=2"], "header_type": "dictionary", "expected": {"a": [1, {}], "b": [2, {}]}, "canonical": ["a=1, b=2"] }, { "name": "whitespace before = dictionary", "raw": ["a =1, b=2"], "header_type": "dictionary", "must_fail": true }, { "name": "whitespace after = dictionary", "raw": ["a=1, b= 2"], "header_type": "dictionary", "must_fail": true }, { "name": "two lines dictionary", "raw": ["a=1", "b=2"], "header_type": "dictionary", "expected": {"a": [1, {}], "b": [2, {}]}, "canonical": ["a=1, b=2"] }, { "name": "missing value dictionary", "raw": ["a=1, b, c=3"], "header_type": "dictionary", "expected": {"a": [1,{}], "b": [true, {}], "c": [3, {}]} }, { "name": "all missing value dictionary", "raw": ["a, b, c"], "header_type": "dictionary", "expected": {"a": [true,{}], "b": [true, {}], "c": [true, {}]} }, { "name": "start missing value dictionary", "raw": ["a, b=2"], "header_type": "dictionary", "expected": {"a": [true,{}], "b": [2, {}]} }, { "name": "end missing value dictionary", "raw": ["a=1, b"], "header_type": "dictionary", "expected": {"a": [1,{}], "b": [true, {}]} }, { "name": "missing value with params dictionary", "raw": ["a=1, b;foo=9, c=3"], "header_type": "dictionary", "expected": {"a": [1,{}], "b": [true, {"foo": 9}], "c": [3, {}]} }, { "name": "explicit true value with params dictionary", "raw": ["a=1, b=?1;foo=9, c=3"], "header_type": "dictionary", "expected": {"a": [1,{}], "b": [true, {"foo": 9}], "c": [3, {}]}, "canonical": ["a=1, b;foo=9, c=3"] }, { "name": "trailing comma dictionary", "raw": ["a=1, b=2,"], "header_type": "dictionary", "must_fail": true }, { "name": "empty item dictionary", "raw": ["a=1,,b=2,"], "header_type": "dictionary", "must_fail": true }, { "name": "duplicate key dictionary", "raw": ["a=1,b=2,a=3"], "header_type": "dictionary", "expected": {"a": [3, {}], "b": [2, {}]}, "canonical": ["a=3, b=2"] }, { "name": "numeric key dictionary", "raw": ["a=1,1b=2,a=1"], "header_type": "dictionary", "must_fail": true }, { "name": "uppercase key dictionary", "raw": ["a=1,B=2,a=1"], "header_type": "dictionary", "must_fail": true }, { "name": "bad key dictionary", "raw": ["a=1,b!=2,a=1"], "header_type": "dictionary", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/display-string.json ================================================ [ { "name": "basic display string (ascii content)", "raw": ["%\"foo bar\""], "header_type": "item", "expected": [{"__type": "displaystring", "value": "foo bar"}, {}] }, { "name": "all printable ascii", "raw": ["%\" !%22#$%25&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\""], "header_type": "item", "expected": [{"__type": "displaystring", "value": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"}, {}] }, { "name": "non-ascii display string (uppercase escaping)", "raw": ["%\"f%C3%BC%C3%BC\""], "canonical": ["%\"f%c3%bc%c3%bc\""], "header_type": "item", "must_fail": true }, { "name": "non-ascii display string (lowercase escaping)", "raw": ["%\"f%c3%bc%c3%bc\""], "header_type": "item", "expected": [{"__type": "displaystring", "value": "füü"}, {}] }, { "name": "tab in display string", "raw": ["%\"\t\""], "header_type": "item", "must_fail": true }, { "name": "newline in display string", "raw": ["%\"\n\""], "header_type": "item", "must_fail": true }, { "name": "single quoted display string", "raw": ["%'foo'"], "header_type": "item", "must_fail": true }, { "name": "unquoted display string", "raw": ["%foo"], "header_type": "item", "must_fail": true }, { "name": "display string missing initial quote", "raw": ["%foo\""], "header_type": "item", "must_fail": true }, { "name": "unbalanced display string", "raw": ["%\"foo"], "header_type": "item", "must_fail": true }, { "name": "display string quoting", "raw": ["%\"foo %22bar%22 \\ baz\""], "header_type": "item", "expected": [{"__type": "displaystring", "value": "foo \"bar\" \\ baz"}, {}] }, { "name": "bad display string escaping", "raw": ["%\"foo %a"], "header_type": "item", "must_fail": true }, { "name": "bad display string utf-8 (invalid 2-byte seq)", "raw": ["%\"%c3%28\""], "header_type": "item", "must_fail": true }, { "name": "bad display string utf-8 (invalid sequence id)", "raw": ["%\"%a0%a1\""], "header_type": "item", "must_fail": true }, { "name": "bad display string utf-8 (invalid hex)", "raw": ["%\"%g0%1w\""], "header_type": "item", "must_fail": true }, { "name": "bad display string utf-8 (invalid 3-byte seq)", "raw": ["%\"%e2%28%a1\""], "header_type": "item", "must_fail": true }, { "name": "bad display string utf-8 (invalid 4-byte seq)", "raw": ["%\"%f0%28%8c%28\""], "header_type": "item", "must_fail": true }, { "name": "BOM in display string", "raw": ["%\"BOM: %ef%bb%bf\""], "header_type": "item", "expected": [{"__type": "displaystring", "value": "BOM: \uFEFF"}, {}] } ] ================================================ FILE: Tests/TestFixtures/examples.json ================================================ [ { "name": "Foo-Example", "raw": ["2; foourl=\"https://foo.example.com/\""], "header_type": "item", "expected": [2, {"foourl": "https://foo.example.com/"}], "canonical": ["2;foourl=\"https://foo.example.com/\""] }, { "name": "Example-StrListHeader", "raw": ["\"foo\", \"bar\", \"It was the best of times.\""], "header_type": "list", "expected": [ ["foo", {}], ["bar", {}], ["It was the best of times.", {}] ] }, { "name": "Example-Hdr (list on one line)", "raw": ["foo, bar"], "header_type": "list", "expected": [ [{"__type":"token", "value":"foo"}, {}], [{"__type":"token", "value":"bar"}, {}] ] }, { "name": "Example-Hdr (list on two lines)", "raw": ["foo", "bar"], "header_type": "list", "expected": [ [{"__type":"token", "value":"foo"}, {}], [{"__type":"token", "value":"bar"}, {}] ], "canonical": ["foo, bar"] }, { "name": "Example-StrListListHeader", "raw": ["(\"foo\" \"bar\"), (\"baz\"), (\"bat\" \"one\"), ()"], "header_type": "list", "expected": [ [[ ["foo", {}], ["bar", {}] ], {}], [[ ["baz", {}] ], {}], [[ ["bat", {}], ["one", {}] ], {}], [[], {}] ] }, { "name": "Example-ListListParam", "raw": ["(\"foo\"; a=1;b=2);lvl=5, (\"bar\" \"baz\");lvl=1"], "header_type": "list", "expected": [ [[ ["foo", {"a": 1, "b": 2}] ], {"lvl": 5}], [[ ["bar", {}], ["baz", {}] ], {"lvl": 1}] ], "canonical": ["(\"foo\";a=1;b=2);lvl=5, (\"bar\" \"baz\");lvl=1"] }, { "name": "Example-ParamListHeader", "raw": ["abc;a=1;b=2; cde_456, (ghi;jk=4 l);q=\"9\";r=w"], "header_type": "list", "expected": [ [{"__type": "token", "value": "abc"}, {"a": 1, "b": 2, "cde_456": true}], [ [ [{"__type": "token", "value": "ghi"}, {"jk": 4}], [{"__type": "token", "value": "l"}, {}] ], {"q": "9", "r": {"__type": "token", "value": "w"}} ] ], "canonical": ["abc;a=1;b=2;cde_456, (ghi;jk=4 l);q=\"9\";r=w"] }, { "name": "Example-IntHeader", "raw": ["1; a; b=?0"], "header_type": "item", "expected": [1, {"a": true, "b": false}], "canonical": ["1;a;b=?0"] }, { "name": "Example-DictHeader", "raw": ["en=\"Applepie\", da=:w4ZibGV0w6ZydGU=:"], "header_type": "dictionary", "expected": { "en": ["Applepie", {}], "da": [{"__type": "binary", "value": "YODGE3DFOTB2M4TUMU======"}, {}] } }, { "name": "Example-DictHeader", "raw": ["a=?0, b, c; foo=bar"], "header_type": "dictionary", "expected": {"a": [false, {}], "b": [true, {}], "c": [ true, {"foo": {"__type": "token", "value": "bar"}} ]}, "canonical": ["a=?0, b, c;foo=bar"] }, { "name": "Example-DictListHeader", "raw": ["rating=1.5, feelings=(joy sadness)"], "header_type": "dictionary", "expected": { "rating": [1.5, {}], "feelings": [[ [{"__type": "token", "value": "joy"}, {}], [{"__type": "token", "value": "sadness"}, {}] ], {}] } }, { "name": "Example-MixDict", "raw": ["a=(1 2), b=3, c=4;aa=bb, d=(5 6);valid"], "header_type": "dictionary", "expected": { "a": [[ [1, {}], [2, {}] ], {}], "b": [3, {}], "c": [4, {"aa": {"__type": "token", "value": "bb"}}], "d": [[ [5, {}], [6, {}] ], {"valid": true}] }, "canonical": ["a=(1 2), b=3, c=4;aa=bb, d=(5 6);valid"] }, { "name": "Example-Hdr (dictionary on one line)", "raw": ["foo=1, bar=2"], "header_type": "dictionary", "expected": { "foo": [1, {}], "bar": [2, {}] } }, { "name": "Example-Hdr (dictionary on two lines)", "raw": ["foo=1", "bar=2"], "header_type": "dictionary", "expected": { "foo": [1, {}], "bar": [2, {}] }, "canonical": ["foo=1, bar=2"] }, { "name": "Example-IntItemHeader", "raw": ["5"], "header_type": "item", "expected": [5, {}] }, { "name": "Example-IntItemHeader (params)", "raw": ["5; foo=bar"], "header_type": "item", "expected": [5, {"foo": {"__type": "token", "value": "bar"}}], "canonical": ["5;foo=bar"] }, { "name": "Example-IntegerHeader", "raw": ["42"], "header_type": "item", "expected": [42, {}] }, { "name": "Example-FloatHeader", "raw": ["4.5"], "header_type": "item", "expected": [4.5, {}] }, { "name": "Example-StringHeader", "raw": ["\"hello world\""], "header_type": "item", "expected": ["hello world", {}] }, { "name": "Example-BinaryHdr", "raw": [":cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:"], "header_type": "item", "expected": [{"__type": "binary", "value": "OBZGK5DFNZSCA5DINFZSA2LTEBRGS3TBOJ4SAY3PNZ2GK3TUFY======"}, {}] }, { "name": "Example-BoolHdr", "raw": ["?1"], "header_type": "item", "expected": [true, {}] } ] ================================================ FILE: Tests/TestFixtures/item.json ================================================ [ { "name": "empty item", "raw": [""], "header_type": "item", "must_fail": true }, { "name": "leading space", "raw": [" \t 1"], "header_type": "item", "must_fail": true }, { "name": "trailing space", "raw": ["1 \t "], "header_type": "item", "must_fail": true }, { "name": "leading and trailing space", "raw": [" 1 "], "header_type": "item", "expected": [1, {}], "canonical": ["1"] }, { "name": "leading and trailing whitespace", "raw": [" 1 "], "header_type": "item", "expected": [1, {}], "canonical": ["1"] } ] ================================================ FILE: Tests/TestFixtures/key-generated.json ================================================ [ { "name": "0x00 in dictionary key", "raw": [ "a\u0000a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x01 in dictionary key", "raw": [ "a\u0001a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x02 in dictionary key", "raw": [ "a\u0002a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x03 in dictionary key", "raw": [ "a\u0003a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x04 in dictionary key", "raw": [ "a\u0004a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x05 in dictionary key", "raw": [ "a\u0005a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x06 in dictionary key", "raw": [ "a\u0006a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x07 in dictionary key", "raw": [ "a\u0007a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x08 in dictionary key", "raw": [ "a\ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x09 in dictionary key", "raw": [ "a\ta=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0a in dictionary key", "raw": [ "a\na=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0b in dictionary key", "raw": [ "a\u000ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0c in dictionary key", "raw": [ "a\fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0d in dictionary key", "raw": [ "a\ra=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0e in dictionary key", "raw": [ "a\u000ea=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0f in dictionary key", "raw": [ "a\u000fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x10 in dictionary key", "raw": [ "a\u0010a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x11 in dictionary key", "raw": [ "a\u0011a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x12 in dictionary key", "raw": [ "a\u0012a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x13 in dictionary key", "raw": [ "a\u0013a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x14 in dictionary key", "raw": [ "a\u0014a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x15 in dictionary key", "raw": [ "a\u0015a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x16 in dictionary key", "raw": [ "a\u0016a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x17 in dictionary key", "raw": [ "a\u0017a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x18 in dictionary key", "raw": [ "a\u0018a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x19 in dictionary key", "raw": [ "a\u0019a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1a in dictionary key", "raw": [ "a\u001aa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1b in dictionary key", "raw": [ "a\u001ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1c in dictionary key", "raw": [ "a\u001ca=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1d in dictionary key", "raw": [ "a\u001da=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1e in dictionary key", "raw": [ "a\u001ea=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1f in dictionary key", "raw": [ "a\u001fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x20 in dictionary key", "raw": [ "a a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x21 in dictionary key", "raw": [ "a!a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x22 in dictionary key", "raw": [ "a\"a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x23 in dictionary key", "raw": [ "a#a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x24 in dictionary key", "raw": [ "a$a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x25 in dictionary key", "raw": [ "a%a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x26 in dictionary key", "raw": [ "a&a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x27 in dictionary key", "raw": [ "a'a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x28 in dictionary key", "raw": [ "a(a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x29 in dictionary key", "raw": [ "a)a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2a in dictionary key", "raw": [ "a*a=1" ], "header_type": "dictionary", "expected": { "a*a": [ 1, {} ] } }, { "name": "0x2b in dictionary key", "raw": [ "a+a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2c in dictionary key", "raw": [ "a,a=1" ], "header_type": "dictionary", "expected": { "a": [ 1, {} ] }, "canonical": [ "a=1" ] }, { "name": "0x2d in dictionary key", "raw": [ "a-a=1" ], "header_type": "dictionary", "expected": { "a-a": [ 1, {} ] } }, { "name": "0x2e in dictionary key", "raw": [ "a.a=1" ], "header_type": "dictionary", "expected": { "a.a": [ 1, {} ] } }, { "name": "0x2f in dictionary key", "raw": [ "a/a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x30 in dictionary key", "raw": [ "a0a=1" ], "header_type": "dictionary", "expected": { "a0a": [ 1, {} ] } }, { "name": "0x31 in dictionary key", "raw": [ "a1a=1" ], "header_type": "dictionary", "expected": { "a1a": [ 1, {} ] } }, { "name": "0x32 in dictionary key", "raw": [ "a2a=1" ], "header_type": "dictionary", "expected": { "a2a": [ 1, {} ] } }, { "name": "0x33 in dictionary key", "raw": [ "a3a=1" ], "header_type": "dictionary", "expected": { "a3a": [ 1, {} ] } }, { "name": "0x34 in dictionary key", "raw": [ "a4a=1" ], "header_type": "dictionary", "expected": { "a4a": [ 1, {} ] } }, { "name": "0x35 in dictionary key", "raw": [ "a5a=1" ], "header_type": "dictionary", "expected": { "a5a": [ 1, {} ] } }, { "name": "0x36 in dictionary key", "raw": [ "a6a=1" ], "header_type": "dictionary", "expected": { "a6a": [ 1, {} ] } }, { "name": "0x37 in dictionary key", "raw": [ "a7a=1" ], "header_type": "dictionary", "expected": { "a7a": [ 1, {} ] } }, { "name": "0x38 in dictionary key", "raw": [ "a8a=1" ], "header_type": "dictionary", "expected": { "a8a": [ 1, {} ] } }, { "name": "0x39 in dictionary key", "raw": [ "a9a=1" ], "header_type": "dictionary", "expected": { "a9a": [ 1, {} ] } }, { "name": "0x3a in dictionary key", "raw": [ "a:a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3b in dictionary key", "raw": [ "a;a=1" ], "header_type": "dictionary", "expected": { "a": [ true, { "a": 1 } ] } }, { "name": "0x3c in dictionary key", "raw": [ "aa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3f in dictionary key", "raw": [ "a?a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x40 in dictionary key", "raw": [ "a@a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x41 in dictionary key", "raw": [ "aAa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x42 in dictionary key", "raw": [ "aBa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x43 in dictionary key", "raw": [ "aCa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x44 in dictionary key", "raw": [ "aDa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x45 in dictionary key", "raw": [ "aEa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x46 in dictionary key", "raw": [ "aFa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x47 in dictionary key", "raw": [ "aGa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x48 in dictionary key", "raw": [ "aHa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x49 in dictionary key", "raw": [ "aIa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4a in dictionary key", "raw": [ "aJa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4b in dictionary key", "raw": [ "aKa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4c in dictionary key", "raw": [ "aLa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4d in dictionary key", "raw": [ "aMa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4e in dictionary key", "raw": [ "aNa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4f in dictionary key", "raw": [ "aOa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x50 in dictionary key", "raw": [ "aPa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x51 in dictionary key", "raw": [ "aQa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x52 in dictionary key", "raw": [ "aRa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x53 in dictionary key", "raw": [ "aSa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x54 in dictionary key", "raw": [ "aTa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x55 in dictionary key", "raw": [ "aUa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x56 in dictionary key", "raw": [ "aVa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x57 in dictionary key", "raw": [ "aWa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x58 in dictionary key", "raw": [ "aXa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x59 in dictionary key", "raw": [ "aYa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5a in dictionary key", "raw": [ "aZa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5b in dictionary key", "raw": [ "a[a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5c in dictionary key", "raw": [ "a\\a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5d in dictionary key", "raw": [ "a]a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5e in dictionary key", "raw": [ "a^a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5f in dictionary key", "raw": [ "a_a=1" ], "header_type": "dictionary", "expected": { "a_a": [ 1, {} ] } }, { "name": "0x60 in dictionary key", "raw": [ "a`a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x61 in dictionary key", "raw": [ "aaa=1" ], "header_type": "dictionary", "expected": { "aaa": [ 1, {} ] } }, { "name": "0x62 in dictionary key", "raw": [ "aba=1" ], "header_type": "dictionary", "expected": { "aba": [ 1, {} ] } }, { "name": "0x63 in dictionary key", "raw": [ "aca=1" ], "header_type": "dictionary", "expected": { "aca": [ 1, {} ] } }, { "name": "0x64 in dictionary key", "raw": [ "ada=1" ], "header_type": "dictionary", "expected": { "ada": [ 1, {} ] } }, { "name": "0x65 in dictionary key", "raw": [ "aea=1" ], "header_type": "dictionary", "expected": { "aea": [ 1, {} ] } }, { "name": "0x66 in dictionary key", "raw": [ "afa=1" ], "header_type": "dictionary", "expected": { "afa": [ 1, {} ] } }, { "name": "0x67 in dictionary key", "raw": [ "aga=1" ], "header_type": "dictionary", "expected": { "aga": [ 1, {} ] } }, { "name": "0x68 in dictionary key", "raw": [ "aha=1" ], "header_type": "dictionary", "expected": { "aha": [ 1, {} ] } }, { "name": "0x69 in dictionary key", "raw": [ "aia=1" ], "header_type": "dictionary", "expected": { "aia": [ 1, {} ] } }, { "name": "0x6a in dictionary key", "raw": [ "aja=1" ], "header_type": "dictionary", "expected": { "aja": [ 1, {} ] } }, { "name": "0x6b in dictionary key", "raw": [ "aka=1" ], "header_type": "dictionary", "expected": { "aka": [ 1, {} ] } }, { "name": "0x6c in dictionary key", "raw": [ "ala=1" ], "header_type": "dictionary", "expected": { "ala": [ 1, {} ] } }, { "name": "0x6d in dictionary key", "raw": [ "ama=1" ], "header_type": "dictionary", "expected": { "ama": [ 1, {} ] } }, { "name": "0x6e in dictionary key", "raw": [ "ana=1" ], "header_type": "dictionary", "expected": { "ana": [ 1, {} ] } }, { "name": "0x6f in dictionary key", "raw": [ "aoa=1" ], "header_type": "dictionary", "expected": { "aoa": [ 1, {} ] } }, { "name": "0x70 in dictionary key", "raw": [ "apa=1" ], "header_type": "dictionary", "expected": { "apa": [ 1, {} ] } }, { "name": "0x71 in dictionary key", "raw": [ "aqa=1" ], "header_type": "dictionary", "expected": { "aqa": [ 1, {} ] } }, { "name": "0x72 in dictionary key", "raw": [ "ara=1" ], "header_type": "dictionary", "expected": { "ara": [ 1, {} ] } }, { "name": "0x73 in dictionary key", "raw": [ "asa=1" ], "header_type": "dictionary", "expected": { "asa": [ 1, {} ] } }, { "name": "0x74 in dictionary key", "raw": [ "ata=1" ], "header_type": "dictionary", "expected": { "ata": [ 1, {} ] } }, { "name": "0x75 in dictionary key", "raw": [ "aua=1" ], "header_type": "dictionary", "expected": { "aua": [ 1, {} ] } }, { "name": "0x76 in dictionary key", "raw": [ "ava=1" ], "header_type": "dictionary", "expected": { "ava": [ 1, {} ] } }, { "name": "0x77 in dictionary key", "raw": [ "awa=1" ], "header_type": "dictionary", "expected": { "awa": [ 1, {} ] } }, { "name": "0x78 in dictionary key", "raw": [ "axa=1" ], "header_type": "dictionary", "expected": { "axa": [ 1, {} ] } }, { "name": "0x79 in dictionary key", "raw": [ "aya=1" ], "header_type": "dictionary", "expected": { "aya": [ 1, {} ] } }, { "name": "0x7a in dictionary key", "raw": [ "aza=1" ], "header_type": "dictionary", "expected": { "aza": [ 1, {} ] } }, { "name": "0x7b in dictionary key", "raw": [ "a{a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7c in dictionary key", "raw": [ "a|a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7d in dictionary key", "raw": [ "a}a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7e in dictionary key", "raw": [ "a~a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7f in dictionary key", "raw": [ "a\u007fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x00 starting an dictionary key", "raw": [ "\u0000a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x01 starting an dictionary key", "raw": [ "\u0001a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x02 starting an dictionary key", "raw": [ "\u0002a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x03 starting an dictionary key", "raw": [ "\u0003a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x04 starting an dictionary key", "raw": [ "\u0004a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x05 starting an dictionary key", "raw": [ "\u0005a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x06 starting an dictionary key", "raw": [ "\u0006a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x07 starting an dictionary key", "raw": [ "\u0007a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x08 starting an dictionary key", "raw": [ "\ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x09 starting an dictionary key", "raw": [ "\ta=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0a starting an dictionary key", "raw": [ "\na=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0b starting an dictionary key", "raw": [ "\u000ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0c starting an dictionary key", "raw": [ "\fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0d starting an dictionary key", "raw": [ "\ra=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0e starting an dictionary key", "raw": [ "\u000ea=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x0f starting an dictionary key", "raw": [ "\u000fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x10 starting an dictionary key", "raw": [ "\u0010a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x11 starting an dictionary key", "raw": [ "\u0011a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x12 starting an dictionary key", "raw": [ "\u0012a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x13 starting an dictionary key", "raw": [ "\u0013a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x14 starting an dictionary key", "raw": [ "\u0014a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x15 starting an dictionary key", "raw": [ "\u0015a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x16 starting an dictionary key", "raw": [ "\u0016a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x17 starting an dictionary key", "raw": [ "\u0017a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x18 starting an dictionary key", "raw": [ "\u0018a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x19 starting an dictionary key", "raw": [ "\u0019a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1a starting an dictionary key", "raw": [ "\u001aa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1b starting an dictionary key", "raw": [ "\u001ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1c starting an dictionary key", "raw": [ "\u001ca=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1d starting an dictionary key", "raw": [ "\u001da=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1e starting an dictionary key", "raw": [ "\u001ea=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x1f starting an dictionary key", "raw": [ "\u001fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x20 starting an dictionary key", "raw": [ " a=1" ], "header_type": "dictionary", "expected": { "a": [ 1, {} ] }, "canonical": [ "a=1" ] }, { "name": "0x21 starting an dictionary key", "raw": [ "!a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x22 starting an dictionary key", "raw": [ "\"a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x23 starting an dictionary key", "raw": [ "#a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x24 starting an dictionary key", "raw": [ "$a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x25 starting an dictionary key", "raw": [ "%a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x26 starting an dictionary key", "raw": [ "&a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x27 starting an dictionary key", "raw": [ "'a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x28 starting an dictionary key", "raw": [ "(a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x29 starting an dictionary key", "raw": [ ")a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2a starting an dictionary key", "raw": [ "*a=1" ], "header_type": "dictionary", "expected": { "*a": [ 1, {} ] } }, { "name": "0x2b starting an dictionary key", "raw": [ "+a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2c starting an dictionary key", "raw": [ ",a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2d starting an dictionary key", "raw": [ "-a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2e starting an dictionary key", "raw": [ ".a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x2f starting an dictionary key", "raw": [ "/a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x30 starting an dictionary key", "raw": [ "0a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x31 starting an dictionary key", "raw": [ "1a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x32 starting an dictionary key", "raw": [ "2a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x33 starting an dictionary key", "raw": [ "3a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x34 starting an dictionary key", "raw": [ "4a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x35 starting an dictionary key", "raw": [ "5a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x36 starting an dictionary key", "raw": [ "6a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x37 starting an dictionary key", "raw": [ "7a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x38 starting an dictionary key", "raw": [ "8a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x39 starting an dictionary key", "raw": [ "9a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3a starting an dictionary key", "raw": [ ":a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3b starting an dictionary key", "raw": [ ";a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3c starting an dictionary key", "raw": [ "a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x3f starting an dictionary key", "raw": [ "?a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x40 starting an dictionary key", "raw": [ "@a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x41 starting an dictionary key", "raw": [ "Aa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x42 starting an dictionary key", "raw": [ "Ba=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x43 starting an dictionary key", "raw": [ "Ca=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x44 starting an dictionary key", "raw": [ "Da=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x45 starting an dictionary key", "raw": [ "Ea=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x46 starting an dictionary key", "raw": [ "Fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x47 starting an dictionary key", "raw": [ "Ga=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x48 starting an dictionary key", "raw": [ "Ha=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x49 starting an dictionary key", "raw": [ "Ia=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4a starting an dictionary key", "raw": [ "Ja=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4b starting an dictionary key", "raw": [ "Ka=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4c starting an dictionary key", "raw": [ "La=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4d starting an dictionary key", "raw": [ "Ma=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4e starting an dictionary key", "raw": [ "Na=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x4f starting an dictionary key", "raw": [ "Oa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x50 starting an dictionary key", "raw": [ "Pa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x51 starting an dictionary key", "raw": [ "Qa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x52 starting an dictionary key", "raw": [ "Ra=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x53 starting an dictionary key", "raw": [ "Sa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x54 starting an dictionary key", "raw": [ "Ta=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x55 starting an dictionary key", "raw": [ "Ua=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x56 starting an dictionary key", "raw": [ "Va=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x57 starting an dictionary key", "raw": [ "Wa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x58 starting an dictionary key", "raw": [ "Xa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x59 starting an dictionary key", "raw": [ "Ya=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5a starting an dictionary key", "raw": [ "Za=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5b starting an dictionary key", "raw": [ "[a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5c starting an dictionary key", "raw": [ "\\a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5d starting an dictionary key", "raw": [ "]a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5e starting an dictionary key", "raw": [ "^a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x5f starting an dictionary key", "raw": [ "_a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x60 starting an dictionary key", "raw": [ "`a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x61 starting an dictionary key", "raw": [ "aa=1" ], "header_type": "dictionary", "expected": { "aa": [ 1, {} ] } }, { "name": "0x62 starting an dictionary key", "raw": [ "ba=1" ], "header_type": "dictionary", "expected": { "ba": [ 1, {} ] } }, { "name": "0x63 starting an dictionary key", "raw": [ "ca=1" ], "header_type": "dictionary", "expected": { "ca": [ 1, {} ] } }, { "name": "0x64 starting an dictionary key", "raw": [ "da=1" ], "header_type": "dictionary", "expected": { "da": [ 1, {} ] } }, { "name": "0x65 starting an dictionary key", "raw": [ "ea=1" ], "header_type": "dictionary", "expected": { "ea": [ 1, {} ] } }, { "name": "0x66 starting an dictionary key", "raw": [ "fa=1" ], "header_type": "dictionary", "expected": { "fa": [ 1, {} ] } }, { "name": "0x67 starting an dictionary key", "raw": [ "ga=1" ], "header_type": "dictionary", "expected": { "ga": [ 1, {} ] } }, { "name": "0x68 starting an dictionary key", "raw": [ "ha=1" ], "header_type": "dictionary", "expected": { "ha": [ 1, {} ] } }, { "name": "0x69 starting an dictionary key", "raw": [ "ia=1" ], "header_type": "dictionary", "expected": { "ia": [ 1, {} ] } }, { "name": "0x6a starting an dictionary key", "raw": [ "ja=1" ], "header_type": "dictionary", "expected": { "ja": [ 1, {} ] } }, { "name": "0x6b starting an dictionary key", "raw": [ "ka=1" ], "header_type": "dictionary", "expected": { "ka": [ 1, {} ] } }, { "name": "0x6c starting an dictionary key", "raw": [ "la=1" ], "header_type": "dictionary", "expected": { "la": [ 1, {} ] } }, { "name": "0x6d starting an dictionary key", "raw": [ "ma=1" ], "header_type": "dictionary", "expected": { "ma": [ 1, {} ] } }, { "name": "0x6e starting an dictionary key", "raw": [ "na=1" ], "header_type": "dictionary", "expected": { "na": [ 1, {} ] } }, { "name": "0x6f starting an dictionary key", "raw": [ "oa=1" ], "header_type": "dictionary", "expected": { "oa": [ 1, {} ] } }, { "name": "0x70 starting an dictionary key", "raw": [ "pa=1" ], "header_type": "dictionary", "expected": { "pa": [ 1, {} ] } }, { "name": "0x71 starting an dictionary key", "raw": [ "qa=1" ], "header_type": "dictionary", "expected": { "qa": [ 1, {} ] } }, { "name": "0x72 starting an dictionary key", "raw": [ "ra=1" ], "header_type": "dictionary", "expected": { "ra": [ 1, {} ] } }, { "name": "0x73 starting an dictionary key", "raw": [ "sa=1" ], "header_type": "dictionary", "expected": { "sa": [ 1, {} ] } }, { "name": "0x74 starting an dictionary key", "raw": [ "ta=1" ], "header_type": "dictionary", "expected": { "ta": [ 1, {} ] } }, { "name": "0x75 starting an dictionary key", "raw": [ "ua=1" ], "header_type": "dictionary", "expected": { "ua": [ 1, {} ] } }, { "name": "0x76 starting an dictionary key", "raw": [ "va=1" ], "header_type": "dictionary", "expected": { "va": [ 1, {} ] } }, { "name": "0x77 starting an dictionary key", "raw": [ "wa=1" ], "header_type": "dictionary", "expected": { "wa": [ 1, {} ] } }, { "name": "0x78 starting an dictionary key", "raw": [ "xa=1" ], "header_type": "dictionary", "expected": { "xa": [ 1, {} ] } }, { "name": "0x79 starting an dictionary key", "raw": [ "ya=1" ], "header_type": "dictionary", "expected": { "ya": [ 1, {} ] } }, { "name": "0x7a starting an dictionary key", "raw": [ "za=1" ], "header_type": "dictionary", "expected": { "za": [ 1, {} ] } }, { "name": "0x7b starting an dictionary key", "raw": [ "{a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7c starting an dictionary key", "raw": [ "|a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7d starting an dictionary key", "raw": [ "}a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7e starting an dictionary key", "raw": [ "~a=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x7f starting an dictionary key", "raw": [ "\u007fa=1" ], "header_type": "dictionary", "must_fail": true }, { "name": "0x00 in parameterised list key", "raw": [ "foo; a\u0000a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x01 in parameterised list key", "raw": [ "foo; a\u0001a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x02 in parameterised list key", "raw": [ "foo; a\u0002a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x03 in parameterised list key", "raw": [ "foo; a\u0003a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x04 in parameterised list key", "raw": [ "foo; a\u0004a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x05 in parameterised list key", "raw": [ "foo; a\u0005a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x06 in parameterised list key", "raw": [ "foo; a\u0006a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x07 in parameterised list key", "raw": [ "foo; a\u0007a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x08 in parameterised list key", "raw": [ "foo; a\ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x09 in parameterised list key", "raw": [ "foo; a\ta=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0a in parameterised list key", "raw": [ "foo; a\na=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0b in parameterised list key", "raw": [ "foo; a\u000ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0c in parameterised list key", "raw": [ "foo; a\fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0d in parameterised list key", "raw": [ "foo; a\ra=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0e in parameterised list key", "raw": [ "foo; a\u000ea=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0f in parameterised list key", "raw": [ "foo; a\u000fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x10 in parameterised list key", "raw": [ "foo; a\u0010a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x11 in parameterised list key", "raw": [ "foo; a\u0011a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x12 in parameterised list key", "raw": [ "foo; a\u0012a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x13 in parameterised list key", "raw": [ "foo; a\u0013a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x14 in parameterised list key", "raw": [ "foo; a\u0014a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x15 in parameterised list key", "raw": [ "foo; a\u0015a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x16 in parameterised list key", "raw": [ "foo; a\u0016a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x17 in parameterised list key", "raw": [ "foo; a\u0017a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x18 in parameterised list key", "raw": [ "foo; a\u0018a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x19 in parameterised list key", "raw": [ "foo; a\u0019a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1a in parameterised list key", "raw": [ "foo; a\u001aa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1b in parameterised list key", "raw": [ "foo; a\u001ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1c in parameterised list key", "raw": [ "foo; a\u001ca=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1d in parameterised list key", "raw": [ "foo; a\u001da=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1e in parameterised list key", "raw": [ "foo; a\u001ea=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1f in parameterised list key", "raw": [ "foo; a\u001fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x20 in parameterised list key", "raw": [ "foo; a a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x21 in parameterised list key", "raw": [ "foo; a!a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x22 in parameterised list key", "raw": [ "foo; a\"a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x23 in parameterised list key", "raw": [ "foo; a#a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x24 in parameterised list key", "raw": [ "foo; a$a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x25 in parameterised list key", "raw": [ "foo; a%a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x26 in parameterised list key", "raw": [ "foo; a&a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x27 in parameterised list key", "raw": [ "foo; a'a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x28 in parameterised list key", "raw": [ "foo; a(a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x29 in parameterised list key", "raw": [ "foo; a)a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2a in parameterised list key", "raw": [ "foo; a*a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a*a": 1 } ] ], "canonical": [ "foo;a*a=1" ] }, { "name": "0x2b in parameterised list key", "raw": [ "foo; a+a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2c in parameterised list key", "raw": [ "foo; a,a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2d in parameterised list key", "raw": [ "foo; a-a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a-a": 1 } ] ], "canonical": [ "foo;a-a=1" ] }, { "name": "0x2e in parameterised list key", "raw": [ "foo; a.a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a.a": 1 } ] ], "canonical": [ "foo;a.a=1" ] }, { "name": "0x2f in parameterised list key", "raw": [ "foo; a/a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x30 in parameterised list key", "raw": [ "foo; a0a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a0a": 1 } ] ], "canonical": [ "foo;a0a=1" ] }, { "name": "0x31 in parameterised list key", "raw": [ "foo; a1a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a1a": 1 } ] ], "canonical": [ "foo;a1a=1" ] }, { "name": "0x32 in parameterised list key", "raw": [ "foo; a2a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a2a": 1 } ] ], "canonical": [ "foo;a2a=1" ] }, { "name": "0x33 in parameterised list key", "raw": [ "foo; a3a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a3a": 1 } ] ], "canonical": [ "foo;a3a=1" ] }, { "name": "0x34 in parameterised list key", "raw": [ "foo; a4a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a4a": 1 } ] ], "canonical": [ "foo;a4a=1" ] }, { "name": "0x35 in parameterised list key", "raw": [ "foo; a5a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a5a": 1 } ] ], "canonical": [ "foo;a5a=1" ] }, { "name": "0x36 in parameterised list key", "raw": [ "foo; a6a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a6a": 1 } ] ], "canonical": [ "foo;a6a=1" ] }, { "name": "0x37 in parameterised list key", "raw": [ "foo; a7a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a7a": 1 } ] ], "canonical": [ "foo;a7a=1" ] }, { "name": "0x38 in parameterised list key", "raw": [ "foo; a8a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a8a": 1 } ] ], "canonical": [ "foo;a8a=1" ] }, { "name": "0x39 in parameterised list key", "raw": [ "foo; a9a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a9a": 1 } ] ], "canonical": [ "foo;a9a=1" ] }, { "name": "0x3a in parameterised list key", "raw": [ "foo; a:a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3b in parameterised list key", "raw": [ "foo; a;a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a": 1 } ] ], "canonical": [ "foo;a=1" ] }, { "name": "0x3c in parameterised list key", "raw": [ "foo; aa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3f in parameterised list key", "raw": [ "foo; a?a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x40 in parameterised list key", "raw": [ "foo; a@a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x41 in parameterised list key", "raw": [ "foo; aAa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x42 in parameterised list key", "raw": [ "foo; aBa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x43 in parameterised list key", "raw": [ "foo; aCa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x44 in parameterised list key", "raw": [ "foo; aDa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x45 in parameterised list key", "raw": [ "foo; aEa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x46 in parameterised list key", "raw": [ "foo; aFa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x47 in parameterised list key", "raw": [ "foo; aGa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x48 in parameterised list key", "raw": [ "foo; aHa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x49 in parameterised list key", "raw": [ "foo; aIa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4a in parameterised list key", "raw": [ "foo; aJa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4b in parameterised list key", "raw": [ "foo; aKa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4c in parameterised list key", "raw": [ "foo; aLa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4d in parameterised list key", "raw": [ "foo; aMa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4e in parameterised list key", "raw": [ "foo; aNa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4f in parameterised list key", "raw": [ "foo; aOa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x50 in parameterised list key", "raw": [ "foo; aPa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x51 in parameterised list key", "raw": [ "foo; aQa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x52 in parameterised list key", "raw": [ "foo; aRa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x53 in parameterised list key", "raw": [ "foo; aSa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x54 in parameterised list key", "raw": [ "foo; aTa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x55 in parameterised list key", "raw": [ "foo; aUa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x56 in parameterised list key", "raw": [ "foo; aVa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x57 in parameterised list key", "raw": [ "foo; aWa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x58 in parameterised list key", "raw": [ "foo; aXa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x59 in parameterised list key", "raw": [ "foo; aYa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5a in parameterised list key", "raw": [ "foo; aZa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5b in parameterised list key", "raw": [ "foo; a[a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5c in parameterised list key", "raw": [ "foo; a\\a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5d in parameterised list key", "raw": [ "foo; a]a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5e in parameterised list key", "raw": [ "foo; a^a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5f in parameterised list key", "raw": [ "foo; a_a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a_a": 1 } ] ], "canonical": [ "foo;a_a=1" ] }, { "name": "0x60 in parameterised list key", "raw": [ "foo; a`a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x61 in parameterised list key", "raw": [ "foo; aaa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aaa": 1 } ] ], "canonical": [ "foo;aaa=1" ] }, { "name": "0x62 in parameterised list key", "raw": [ "foo; aba=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aba": 1 } ] ], "canonical": [ "foo;aba=1" ] }, { "name": "0x63 in parameterised list key", "raw": [ "foo; aca=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aca": 1 } ] ], "canonical": [ "foo;aca=1" ] }, { "name": "0x64 in parameterised list key", "raw": [ "foo; ada=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ada": 1 } ] ], "canonical": [ "foo;ada=1" ] }, { "name": "0x65 in parameterised list key", "raw": [ "foo; aea=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aea": 1 } ] ], "canonical": [ "foo;aea=1" ] }, { "name": "0x66 in parameterised list key", "raw": [ "foo; afa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "afa": 1 } ] ], "canonical": [ "foo;afa=1" ] }, { "name": "0x67 in parameterised list key", "raw": [ "foo; aga=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aga": 1 } ] ], "canonical": [ "foo;aga=1" ] }, { "name": "0x68 in parameterised list key", "raw": [ "foo; aha=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aha": 1 } ] ], "canonical": [ "foo;aha=1" ] }, { "name": "0x69 in parameterised list key", "raw": [ "foo; aia=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aia": 1 } ] ], "canonical": [ "foo;aia=1" ] }, { "name": "0x6a in parameterised list key", "raw": [ "foo; aja=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aja": 1 } ] ], "canonical": [ "foo;aja=1" ] }, { "name": "0x6b in parameterised list key", "raw": [ "foo; aka=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aka": 1 } ] ], "canonical": [ "foo;aka=1" ] }, { "name": "0x6c in parameterised list key", "raw": [ "foo; ala=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ala": 1 } ] ], "canonical": [ "foo;ala=1" ] }, { "name": "0x6d in parameterised list key", "raw": [ "foo; ama=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ama": 1 } ] ], "canonical": [ "foo;ama=1" ] }, { "name": "0x6e in parameterised list key", "raw": [ "foo; ana=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ana": 1 } ] ], "canonical": [ "foo;ana=1" ] }, { "name": "0x6f in parameterised list key", "raw": [ "foo; aoa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aoa": 1 } ] ], "canonical": [ "foo;aoa=1" ] }, { "name": "0x70 in parameterised list key", "raw": [ "foo; apa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "apa": 1 } ] ], "canonical": [ "foo;apa=1" ] }, { "name": "0x71 in parameterised list key", "raw": [ "foo; aqa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aqa": 1 } ] ], "canonical": [ "foo;aqa=1" ] }, { "name": "0x72 in parameterised list key", "raw": [ "foo; ara=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ara": 1 } ] ], "canonical": [ "foo;ara=1" ] }, { "name": "0x73 in parameterised list key", "raw": [ "foo; asa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "asa": 1 } ] ], "canonical": [ "foo;asa=1" ] }, { "name": "0x74 in parameterised list key", "raw": [ "foo; ata=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ata": 1 } ] ], "canonical": [ "foo;ata=1" ] }, { "name": "0x75 in parameterised list key", "raw": [ "foo; aua=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aua": 1 } ] ], "canonical": [ "foo;aua=1" ] }, { "name": "0x76 in parameterised list key", "raw": [ "foo; ava=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ava": 1 } ] ], "canonical": [ "foo;ava=1" ] }, { "name": "0x77 in parameterised list key", "raw": [ "foo; awa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "awa": 1 } ] ], "canonical": [ "foo;awa=1" ] }, { "name": "0x78 in parameterised list key", "raw": [ "foo; axa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "axa": 1 } ] ], "canonical": [ "foo;axa=1" ] }, { "name": "0x79 in parameterised list key", "raw": [ "foo; aya=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aya": 1 } ] ], "canonical": [ "foo;aya=1" ] }, { "name": "0x7a in parameterised list key", "raw": [ "foo; aza=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aza": 1 } ] ], "canonical": [ "foo;aza=1" ] }, { "name": "0x7b in parameterised list key", "raw": [ "foo; a{a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7c in parameterised list key", "raw": [ "foo; a|a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7d in parameterised list key", "raw": [ "foo; a}a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7e in parameterised list key", "raw": [ "foo; a~a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7f in parameterised list key", "raw": [ "foo; a\u007fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x00 starting a parameterised list key", "raw": [ "foo; \u0000a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x01 starting a parameterised list key", "raw": [ "foo; \u0001a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x02 starting a parameterised list key", "raw": [ "foo; \u0002a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x03 starting a parameterised list key", "raw": [ "foo; \u0003a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x04 starting a parameterised list key", "raw": [ "foo; \u0004a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x05 starting a parameterised list key", "raw": [ "foo; \u0005a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x06 starting a parameterised list key", "raw": [ "foo; \u0006a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x07 starting a parameterised list key", "raw": [ "foo; \u0007a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x08 starting a parameterised list key", "raw": [ "foo; \ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x09 starting a parameterised list key", "raw": [ "foo; \ta=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0a starting a parameterised list key", "raw": [ "foo; \na=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0b starting a parameterised list key", "raw": [ "foo; \u000ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0c starting a parameterised list key", "raw": [ "foo; \fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0d starting a parameterised list key", "raw": [ "foo; \ra=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0e starting a parameterised list key", "raw": [ "foo; \u000ea=1" ], "header_type": "list", "must_fail": true }, { "name": "0x0f starting a parameterised list key", "raw": [ "foo; \u000fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x10 starting a parameterised list key", "raw": [ "foo; \u0010a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x11 starting a parameterised list key", "raw": [ "foo; \u0011a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x12 starting a parameterised list key", "raw": [ "foo; \u0012a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x13 starting a parameterised list key", "raw": [ "foo; \u0013a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x14 starting a parameterised list key", "raw": [ "foo; \u0014a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x15 starting a parameterised list key", "raw": [ "foo; \u0015a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x16 starting a parameterised list key", "raw": [ "foo; \u0016a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x17 starting a parameterised list key", "raw": [ "foo; \u0017a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x18 starting a parameterised list key", "raw": [ "foo; \u0018a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x19 starting a parameterised list key", "raw": [ "foo; \u0019a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1a starting a parameterised list key", "raw": [ "foo; \u001aa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1b starting a parameterised list key", "raw": [ "foo; \u001ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1c starting a parameterised list key", "raw": [ "foo; \u001ca=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1d starting a parameterised list key", "raw": [ "foo; \u001da=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1e starting a parameterised list key", "raw": [ "foo; \u001ea=1" ], "header_type": "list", "must_fail": true }, { "name": "0x1f starting a parameterised list key", "raw": [ "foo; \u001fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x20 starting a parameterised list key", "raw": [ "foo; a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a": 1 } ] ], "canonical": [ "foo;a=1" ] }, { "name": "0x21 starting a parameterised list key", "raw": [ "foo; !a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x22 starting a parameterised list key", "raw": [ "foo; \"a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x23 starting a parameterised list key", "raw": [ "foo; #a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x24 starting a parameterised list key", "raw": [ "foo; $a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x25 starting a parameterised list key", "raw": [ "foo; %a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x26 starting a parameterised list key", "raw": [ "foo; &a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x27 starting a parameterised list key", "raw": [ "foo; 'a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x28 starting a parameterised list key", "raw": [ "foo; (a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x29 starting a parameterised list key", "raw": [ "foo; )a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2a starting a parameterised list key", "raw": [ "foo; *a=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "*a": 1 } ] ], "canonical": [ "foo;*a=1" ] }, { "name": "0x2b starting a parameterised list key", "raw": [ "foo; +a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2c starting a parameterised list key", "raw": [ "foo; ,a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2d starting a parameterised list key", "raw": [ "foo; -a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2e starting a parameterised list key", "raw": [ "foo; .a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x2f starting a parameterised list key", "raw": [ "foo; /a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x30 starting a parameterised list key", "raw": [ "foo; 0a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x31 starting a parameterised list key", "raw": [ "foo; 1a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x32 starting a parameterised list key", "raw": [ "foo; 2a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x33 starting a parameterised list key", "raw": [ "foo; 3a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x34 starting a parameterised list key", "raw": [ "foo; 4a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x35 starting a parameterised list key", "raw": [ "foo; 5a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x36 starting a parameterised list key", "raw": [ "foo; 6a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x37 starting a parameterised list key", "raw": [ "foo; 7a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x38 starting a parameterised list key", "raw": [ "foo; 8a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x39 starting a parameterised list key", "raw": [ "foo; 9a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3a starting a parameterised list key", "raw": [ "foo; :a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3b starting a parameterised list key", "raw": [ "foo; ;a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3c starting a parameterised list key", "raw": [ "foo; a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x3f starting a parameterised list key", "raw": [ "foo; ?a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x40 starting a parameterised list key", "raw": [ "foo; @a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x41 starting a parameterised list key", "raw": [ "foo; Aa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x42 starting a parameterised list key", "raw": [ "foo; Ba=1" ], "header_type": "list", "must_fail": true }, { "name": "0x43 starting a parameterised list key", "raw": [ "foo; Ca=1" ], "header_type": "list", "must_fail": true }, { "name": "0x44 starting a parameterised list key", "raw": [ "foo; Da=1" ], "header_type": "list", "must_fail": true }, { "name": "0x45 starting a parameterised list key", "raw": [ "foo; Ea=1" ], "header_type": "list", "must_fail": true }, { "name": "0x46 starting a parameterised list key", "raw": [ "foo; Fa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x47 starting a parameterised list key", "raw": [ "foo; Ga=1" ], "header_type": "list", "must_fail": true }, { "name": "0x48 starting a parameterised list key", "raw": [ "foo; Ha=1" ], "header_type": "list", "must_fail": true }, { "name": "0x49 starting a parameterised list key", "raw": [ "foo; Ia=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4a starting a parameterised list key", "raw": [ "foo; Ja=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4b starting a parameterised list key", "raw": [ "foo; Ka=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4c starting a parameterised list key", "raw": [ "foo; La=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4d starting a parameterised list key", "raw": [ "foo; Ma=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4e starting a parameterised list key", "raw": [ "foo; Na=1" ], "header_type": "list", "must_fail": true }, { "name": "0x4f starting a parameterised list key", "raw": [ "foo; Oa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x50 starting a parameterised list key", "raw": [ "foo; Pa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x51 starting a parameterised list key", "raw": [ "foo; Qa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x52 starting a parameterised list key", "raw": [ "foo; Ra=1" ], "header_type": "list", "must_fail": true }, { "name": "0x53 starting a parameterised list key", "raw": [ "foo; Sa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x54 starting a parameterised list key", "raw": [ "foo; Ta=1" ], "header_type": "list", "must_fail": true }, { "name": "0x55 starting a parameterised list key", "raw": [ "foo; Ua=1" ], "header_type": "list", "must_fail": true }, { "name": "0x56 starting a parameterised list key", "raw": [ "foo; Va=1" ], "header_type": "list", "must_fail": true }, { "name": "0x57 starting a parameterised list key", "raw": [ "foo; Wa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x58 starting a parameterised list key", "raw": [ "foo; Xa=1" ], "header_type": "list", "must_fail": true }, { "name": "0x59 starting a parameterised list key", "raw": [ "foo; Ya=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5a starting a parameterised list key", "raw": [ "foo; Za=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5b starting a parameterised list key", "raw": [ "foo; [a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5c starting a parameterised list key", "raw": [ "foo; \\a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5d starting a parameterised list key", "raw": [ "foo; ]a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5e starting a parameterised list key", "raw": [ "foo; ^a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x5f starting a parameterised list key", "raw": [ "foo; _a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x60 starting a parameterised list key", "raw": [ "foo; `a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x61 starting a parameterised list key", "raw": [ "foo; aa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aa": 1 } ] ], "canonical": [ "foo;aa=1" ] }, { "name": "0x62 starting a parameterised list key", "raw": [ "foo; ba=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ba": 1 } ] ], "canonical": [ "foo;ba=1" ] }, { "name": "0x63 starting a parameterised list key", "raw": [ "foo; ca=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ca": 1 } ] ], "canonical": [ "foo;ca=1" ] }, { "name": "0x64 starting a parameterised list key", "raw": [ "foo; da=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "da": 1 } ] ], "canonical": [ "foo;da=1" ] }, { "name": "0x65 starting a parameterised list key", "raw": [ "foo; ea=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ea": 1 } ] ], "canonical": [ "foo;ea=1" ] }, { "name": "0x66 starting a parameterised list key", "raw": [ "foo; fa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "fa": 1 } ] ], "canonical": [ "foo;fa=1" ] }, { "name": "0x67 starting a parameterised list key", "raw": [ "foo; ga=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ga": 1 } ] ], "canonical": [ "foo;ga=1" ] }, { "name": "0x68 starting a parameterised list key", "raw": [ "foo; ha=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ha": 1 } ] ], "canonical": [ "foo;ha=1" ] }, { "name": "0x69 starting a parameterised list key", "raw": [ "foo; ia=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ia": 1 } ] ], "canonical": [ "foo;ia=1" ] }, { "name": "0x6a starting a parameterised list key", "raw": [ "foo; ja=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ja": 1 } ] ], "canonical": [ "foo;ja=1" ] }, { "name": "0x6b starting a parameterised list key", "raw": [ "foo; ka=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ka": 1 } ] ], "canonical": [ "foo;ka=1" ] }, { "name": "0x6c starting a parameterised list key", "raw": [ "foo; la=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "la": 1 } ] ], "canonical": [ "foo;la=1" ] }, { "name": "0x6d starting a parameterised list key", "raw": [ "foo; ma=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ma": 1 } ] ], "canonical": [ "foo;ma=1" ] }, { "name": "0x6e starting a parameterised list key", "raw": [ "foo; na=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "na": 1 } ] ], "canonical": [ "foo;na=1" ] }, { "name": "0x6f starting a parameterised list key", "raw": [ "foo; oa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "oa": 1 } ] ], "canonical": [ "foo;oa=1" ] }, { "name": "0x70 starting a parameterised list key", "raw": [ "foo; pa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "pa": 1 } ] ], "canonical": [ "foo;pa=1" ] }, { "name": "0x71 starting a parameterised list key", "raw": [ "foo; qa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "qa": 1 } ] ], "canonical": [ "foo;qa=1" ] }, { "name": "0x72 starting a parameterised list key", "raw": [ "foo; ra=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ra": 1 } ] ], "canonical": [ "foo;ra=1" ] }, { "name": "0x73 starting a parameterised list key", "raw": [ "foo; sa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "sa": 1 } ] ], "canonical": [ "foo;sa=1" ] }, { "name": "0x74 starting a parameterised list key", "raw": [ "foo; ta=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ta": 1 } ] ], "canonical": [ "foo;ta=1" ] }, { "name": "0x75 starting a parameterised list key", "raw": [ "foo; ua=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ua": 1 } ] ], "canonical": [ "foo;ua=1" ] }, { "name": "0x76 starting a parameterised list key", "raw": [ "foo; va=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "va": 1 } ] ], "canonical": [ "foo;va=1" ] }, { "name": "0x77 starting a parameterised list key", "raw": [ "foo; wa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "wa": 1 } ] ], "canonical": [ "foo;wa=1" ] }, { "name": "0x78 starting a parameterised list key", "raw": [ "foo; xa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "xa": 1 } ] ], "canonical": [ "foo;xa=1" ] }, { "name": "0x79 starting a parameterised list key", "raw": [ "foo; ya=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "ya": 1 } ] ], "canonical": [ "foo;ya=1" ] }, { "name": "0x7a starting a parameterised list key", "raw": [ "foo; za=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "za": 1 } ] ], "canonical": [ "foo;za=1" ] }, { "name": "0x7b starting a parameterised list key", "raw": [ "foo; {a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7c starting a parameterised list key", "raw": [ "foo; |a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7d starting a parameterised list key", "raw": [ "foo; }a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7e starting a parameterised list key", "raw": [ "foo; ~a=1" ], "header_type": "list", "must_fail": true }, { "name": "0x7f starting a parameterised list key", "raw": [ "foo; \u007fa=1" ], "header_type": "list", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/large-generated.json ================================================ [ { "name": "large dictionary", "raw": [ "a0=1, a1=1, a2=1, a3=1, a4=1, a5=1, a6=1, a7=1, a8=1, a9=1, a10=1, a11=1, a12=1, a13=1, a14=1, a15=1, a16=1, a17=1, a18=1, a19=1, a20=1, a21=1, a22=1, a23=1, a24=1, a25=1, a26=1, a27=1, a28=1, a29=1, a30=1, a31=1, a32=1, a33=1, a34=1, a35=1, a36=1, a37=1, a38=1, a39=1, a40=1, a41=1, a42=1, a43=1, a44=1, a45=1, a46=1, a47=1, a48=1, a49=1, a50=1, a51=1, a52=1, a53=1, a54=1, a55=1, a56=1, a57=1, a58=1, a59=1, a60=1, a61=1, a62=1, a63=1, a64=1, a65=1, a66=1, a67=1, a68=1, a69=1, a70=1, a71=1, a72=1, a73=1, a74=1, a75=1, a76=1, a77=1, a78=1, a79=1, a80=1, a81=1, a82=1, a83=1, a84=1, a85=1, a86=1, a87=1, a88=1, a89=1, a90=1, a91=1, a92=1, a93=1, a94=1, a95=1, a96=1, a97=1, a98=1, a99=1, a100=1, a101=1, a102=1, a103=1, a104=1, a105=1, a106=1, a107=1, a108=1, a109=1, a110=1, a111=1, a112=1, a113=1, a114=1, a115=1, a116=1, a117=1, a118=1, a119=1, a120=1, a121=1, a122=1, a123=1, a124=1, a125=1, a126=1, a127=1, a128=1, a129=1, a130=1, a131=1, a132=1, a133=1, a134=1, a135=1, a136=1, a137=1, a138=1, a139=1, a140=1, a141=1, a142=1, a143=1, a144=1, a145=1, a146=1, a147=1, a148=1, a149=1, a150=1, a151=1, a152=1, a153=1, a154=1, a155=1, a156=1, a157=1, a158=1, a159=1, a160=1, a161=1, a162=1, a163=1, a164=1, a165=1, a166=1, a167=1, a168=1, a169=1, a170=1, a171=1, a172=1, a173=1, a174=1, a175=1, a176=1, a177=1, a178=1, a179=1, a180=1, a181=1, a182=1, a183=1, a184=1, a185=1, a186=1, a187=1, a188=1, a189=1, a190=1, a191=1, a192=1, a193=1, a194=1, a195=1, a196=1, a197=1, a198=1, a199=1, a200=1, a201=1, a202=1, a203=1, a204=1, a205=1, a206=1, a207=1, a208=1, a209=1, a210=1, a211=1, a212=1, a213=1, a214=1, a215=1, a216=1, a217=1, a218=1, a219=1, a220=1, a221=1, a222=1, a223=1, a224=1, a225=1, a226=1, a227=1, a228=1, a229=1, a230=1, a231=1, a232=1, a233=1, a234=1, a235=1, a236=1, a237=1, a238=1, a239=1, a240=1, a241=1, a242=1, a243=1, a244=1, a245=1, a246=1, a247=1, a248=1, a249=1, a250=1, a251=1, a252=1, a253=1, a254=1, a255=1, a256=1, a257=1, a258=1, a259=1, a260=1, a261=1, a262=1, a263=1, a264=1, a265=1, a266=1, a267=1, a268=1, a269=1, a270=1, a271=1, a272=1, a273=1, a274=1, a275=1, a276=1, a277=1, a278=1, a279=1, a280=1, a281=1, a282=1, a283=1, a284=1, a285=1, a286=1, a287=1, a288=1, a289=1, a290=1, a291=1, a292=1, a293=1, a294=1, a295=1, a296=1, a297=1, a298=1, a299=1, a300=1, a301=1, a302=1, a303=1, a304=1, a305=1, a306=1, a307=1, a308=1, a309=1, a310=1, a311=1, a312=1, a313=1, a314=1, a315=1, a316=1, a317=1, a318=1, a319=1, a320=1, a321=1, a322=1, a323=1, a324=1, a325=1, a326=1, a327=1, a328=1, a329=1, a330=1, a331=1, a332=1, a333=1, a334=1, a335=1, a336=1, a337=1, a338=1, a339=1, a340=1, a341=1, a342=1, a343=1, a344=1, a345=1, a346=1, a347=1, a348=1, a349=1, a350=1, a351=1, a352=1, a353=1, a354=1, a355=1, a356=1, a357=1, a358=1, a359=1, a360=1, a361=1, a362=1, a363=1, a364=1, a365=1, a366=1, a367=1, a368=1, a369=1, a370=1, a371=1, a372=1, a373=1, a374=1, a375=1, a376=1, a377=1, a378=1, a379=1, a380=1, a381=1, a382=1, a383=1, a384=1, a385=1, a386=1, a387=1, a388=1, a389=1, a390=1, a391=1, a392=1, a393=1, a394=1, a395=1, a396=1, a397=1, a398=1, a399=1, a400=1, a401=1, a402=1, a403=1, a404=1, a405=1, a406=1, a407=1, a408=1, a409=1, a410=1, a411=1, a412=1, a413=1, a414=1, a415=1, a416=1, a417=1, a418=1, a419=1, a420=1, a421=1, a422=1, a423=1, a424=1, a425=1, a426=1, a427=1, a428=1, a429=1, a430=1, a431=1, a432=1, a433=1, a434=1, a435=1, a436=1, a437=1, a438=1, a439=1, a440=1, a441=1, a442=1, a443=1, a444=1, a445=1, a446=1, a447=1, a448=1, a449=1, a450=1, a451=1, a452=1, a453=1, a454=1, a455=1, a456=1, a457=1, a458=1, a459=1, a460=1, a461=1, a462=1, a463=1, a464=1, a465=1, a466=1, a467=1, a468=1, a469=1, a470=1, a471=1, a472=1, a473=1, a474=1, a475=1, a476=1, a477=1, a478=1, a479=1, a480=1, a481=1, a482=1, a483=1, a484=1, a485=1, a486=1, a487=1, a488=1, a489=1, a490=1, a491=1, a492=1, a493=1, a494=1, a495=1, a496=1, a497=1, a498=1, a499=1, a500=1, a501=1, a502=1, a503=1, a504=1, a505=1, a506=1, a507=1, a508=1, a509=1, a510=1, a511=1, a512=1, a513=1, a514=1, a515=1, a516=1, a517=1, a518=1, a519=1, a520=1, a521=1, a522=1, a523=1, a524=1, a525=1, a526=1, a527=1, a528=1, a529=1, a530=1, a531=1, a532=1, a533=1, a534=1, a535=1, a536=1, a537=1, a538=1, a539=1, a540=1, a541=1, a542=1, a543=1, a544=1, a545=1, a546=1, a547=1, a548=1, a549=1, a550=1, a551=1, a552=1, a553=1, a554=1, a555=1, a556=1, a557=1, a558=1, a559=1, a560=1, a561=1, a562=1, a563=1, a564=1, a565=1, a566=1, a567=1, a568=1, a569=1, a570=1, a571=1, a572=1, a573=1, a574=1, a575=1, a576=1, a577=1, a578=1, a579=1, a580=1, a581=1, a582=1, a583=1, a584=1, a585=1, a586=1, a587=1, a588=1, a589=1, a590=1, a591=1, a592=1, a593=1, a594=1, a595=1, a596=1, a597=1, a598=1, a599=1, a600=1, a601=1, a602=1, a603=1, a604=1, a605=1, a606=1, a607=1, a608=1, a609=1, a610=1, a611=1, a612=1, a613=1, a614=1, a615=1, a616=1, a617=1, a618=1, a619=1, a620=1, a621=1, a622=1, a623=1, a624=1, a625=1, a626=1, a627=1, a628=1, a629=1, a630=1, a631=1, a632=1, a633=1, a634=1, a635=1, a636=1, a637=1, a638=1, a639=1, a640=1, a641=1, a642=1, a643=1, a644=1, a645=1, a646=1, a647=1, a648=1, a649=1, a650=1, a651=1, a652=1, a653=1, a654=1, a655=1, a656=1, a657=1, a658=1, a659=1, a660=1, a661=1, a662=1, a663=1, a664=1, a665=1, a666=1, a667=1, a668=1, a669=1, a670=1, a671=1, a672=1, a673=1, a674=1, a675=1, a676=1, a677=1, a678=1, a679=1, a680=1, a681=1, a682=1, a683=1, a684=1, a685=1, a686=1, a687=1, a688=1, a689=1, a690=1, a691=1, a692=1, a693=1, a694=1, a695=1, a696=1, a697=1, a698=1, a699=1, a700=1, a701=1, a702=1, a703=1, a704=1, a705=1, a706=1, a707=1, a708=1, a709=1, a710=1, a711=1, a712=1, a713=1, a714=1, a715=1, a716=1, a717=1, a718=1, a719=1, a720=1, a721=1, a722=1, a723=1, a724=1, a725=1, a726=1, a727=1, a728=1, a729=1, a730=1, a731=1, a732=1, a733=1, a734=1, a735=1, a736=1, a737=1, a738=1, a739=1, a740=1, a741=1, a742=1, a743=1, a744=1, a745=1, a746=1, a747=1, a748=1, a749=1, a750=1, a751=1, a752=1, a753=1, a754=1, a755=1, a756=1, a757=1, a758=1, a759=1, a760=1, a761=1, a762=1, a763=1, a764=1, a765=1, a766=1, a767=1, a768=1, a769=1, a770=1, a771=1, a772=1, a773=1, a774=1, a775=1, a776=1, a777=1, a778=1, a779=1, a780=1, a781=1, a782=1, a783=1, a784=1, a785=1, a786=1, a787=1, a788=1, a789=1, a790=1, a791=1, a792=1, a793=1, a794=1, a795=1, a796=1, a797=1, a798=1, a799=1, a800=1, a801=1, a802=1, a803=1, a804=1, a805=1, a806=1, a807=1, a808=1, a809=1, a810=1, a811=1, a812=1, a813=1, a814=1, a815=1, a816=1, a817=1, a818=1, a819=1, a820=1, a821=1, a822=1, a823=1, a824=1, a825=1, a826=1, a827=1, a828=1, a829=1, a830=1, a831=1, a832=1, a833=1, a834=1, a835=1, a836=1, a837=1, a838=1, a839=1, a840=1, a841=1, a842=1, a843=1, a844=1, a845=1, a846=1, a847=1, a848=1, a849=1, a850=1, a851=1, a852=1, a853=1, a854=1, a855=1, a856=1, a857=1, a858=1, a859=1, a860=1, a861=1, a862=1, a863=1, a864=1, a865=1, a866=1, a867=1, a868=1, a869=1, a870=1, a871=1, a872=1, a873=1, a874=1, a875=1, a876=1, a877=1, a878=1, a879=1, a880=1, a881=1, a882=1, a883=1, a884=1, a885=1, a886=1, a887=1, a888=1, a889=1, a890=1, a891=1, a892=1, a893=1, a894=1, a895=1, a896=1, a897=1, a898=1, a899=1, a900=1, a901=1, a902=1, a903=1, a904=1, a905=1, a906=1, a907=1, a908=1, a909=1, a910=1, a911=1, a912=1, a913=1, a914=1, a915=1, a916=1, a917=1, a918=1, a919=1, a920=1, a921=1, a922=1, a923=1, a924=1, a925=1, a926=1, a927=1, a928=1, a929=1, a930=1, a931=1, a932=1, a933=1, a934=1, a935=1, a936=1, a937=1, a938=1, a939=1, a940=1, a941=1, a942=1, a943=1, a944=1, a945=1, a946=1, a947=1, a948=1, a949=1, a950=1, a951=1, a952=1, a953=1, a954=1, a955=1, a956=1, a957=1, a958=1, a959=1, a960=1, a961=1, a962=1, a963=1, a964=1, a965=1, a966=1, a967=1, a968=1, a969=1, a970=1, a971=1, a972=1, a973=1, a974=1, a975=1, a976=1, a977=1, a978=1, a979=1, a980=1, a981=1, a982=1, a983=1, a984=1, a985=1, a986=1, a987=1, a988=1, a989=1, a990=1, a991=1, a992=1, a993=1, a994=1, a995=1, a996=1, a997=1, a998=1, a999=1, a1000=1, a1001=1, a1002=1, a1003=1, a1004=1, a1005=1, a1006=1, a1007=1, a1008=1, a1009=1, a1010=1, a1011=1, a1012=1, a1013=1, a1014=1, a1015=1, a1016=1, a1017=1, a1018=1, a1019=1, a1020=1, a1021=1, a1022=1, a1023=1" ], "header_type": "dictionary", "expected": { "a0": [ 1, {} ], "a1": [ 1, {} ], "a2": [ 1, {} ], "a3": [ 1, {} ], "a4": [ 1, {} ], "a5": [ 1, {} ], "a6": [ 1, {} ], "a7": [ 1, {} ], "a8": [ 1, {} ], "a9": [ 1, {} ], "a10": [ 1, {} ], "a11": [ 1, {} ], "a12": [ 1, {} ], "a13": [ 1, {} ], "a14": [ 1, {} ], "a15": [ 1, {} ], "a16": [ 1, {} ], "a17": [ 1, {} ], "a18": [ 1, {} ], "a19": [ 1, {} ], "a20": [ 1, {} ], "a21": [ 1, {} ], "a22": [ 1, {} ], "a23": [ 1, {} ], "a24": [ 1, {} ], "a25": [ 1, {} ], "a26": [ 1, {} ], "a27": [ 1, {} ], "a28": [ 1, {} ], "a29": [ 1, {} ], "a30": [ 1, {} ], "a31": [ 1, {} ], "a32": [ 1, {} ], "a33": [ 1, {} ], "a34": [ 1, {} ], "a35": [ 1, {} ], "a36": [ 1, {} ], "a37": [ 1, {} ], "a38": [ 1, {} ], "a39": [ 1, {} ], "a40": [ 1, {} ], "a41": [ 1, {} ], "a42": [ 1, {} ], "a43": [ 1, {} ], "a44": [ 1, {} ], "a45": [ 1, {} ], "a46": [ 1, {} ], "a47": [ 1, {} ], "a48": [ 1, {} ], "a49": [ 1, {} ], "a50": [ 1, {} ], "a51": [ 1, {} ], "a52": [ 1, {} ], "a53": [ 1, {} ], "a54": [ 1, {} ], "a55": [ 1, {} ], "a56": [ 1, {} ], "a57": [ 1, {} ], "a58": [ 1, {} ], "a59": [ 1, {} ], "a60": [ 1, {} ], "a61": [ 1, {} ], "a62": [ 1, {} ], "a63": [ 1, {} ], "a64": [ 1, {} ], "a65": [ 1, {} ], "a66": [ 1, {} ], "a67": [ 1, {} ], "a68": [ 1, {} ], "a69": [ 1, {} ], "a70": [ 1, {} ], "a71": [ 1, {} ], "a72": [ 1, {} ], "a73": [ 1, {} ], "a74": [ 1, {} ], "a75": [ 1, {} ], "a76": [ 1, {} ], "a77": [ 1, {} ], "a78": [ 1, {} ], "a79": [ 1, {} ], "a80": [ 1, {} ], "a81": [ 1, {} ], "a82": [ 1, {} ], "a83": [ 1, {} ], "a84": [ 1, {} ], "a85": [ 1, {} ], "a86": [ 1, {} ], "a87": [ 1, {} ], "a88": [ 1, {} ], "a89": [ 1, {} ], "a90": [ 1, {} ], "a91": [ 1, {} ], "a92": [ 1, {} ], "a93": [ 1, {} ], "a94": [ 1, {} ], "a95": [ 1, {} ], "a96": [ 1, {} ], "a97": [ 1, {} ], "a98": [ 1, {} ], "a99": [ 1, {} ], "a100": [ 1, {} ], "a101": [ 1, {} ], "a102": [ 1, {} ], "a103": [ 1, {} ], "a104": [ 1, {} ], "a105": [ 1, {} ], "a106": [ 1, {} ], "a107": [ 1, {} ], "a108": [ 1, {} ], "a109": [ 1, {} ], "a110": [ 1, {} ], "a111": [ 1, {} ], "a112": [ 1, {} ], "a113": [ 1, {} ], "a114": [ 1, {} ], "a115": [ 1, {} ], "a116": [ 1, {} ], "a117": [ 1, {} ], "a118": [ 1, {} ], "a119": [ 1, {} ], "a120": [ 1, {} ], "a121": [ 1, {} ], "a122": [ 1, {} ], "a123": [ 1, {} ], "a124": [ 1, {} ], "a125": [ 1, {} ], "a126": [ 1, {} ], "a127": [ 1, {} ], "a128": [ 1, {} ], "a129": [ 1, {} ], "a130": [ 1, {} ], "a131": [ 1, {} ], "a132": [ 1, {} ], "a133": [ 1, {} ], "a134": [ 1, {} ], "a135": [ 1, {} ], "a136": [ 1, {} ], "a137": [ 1, {} ], "a138": [ 1, {} ], "a139": [ 1, {} ], "a140": [ 1, {} ], "a141": [ 1, {} ], "a142": [ 1, {} ], "a143": [ 1, {} ], "a144": [ 1, {} ], "a145": [ 1, {} ], "a146": [ 1, {} ], "a147": [ 1, {} ], "a148": [ 1, {} ], "a149": [ 1, {} ], "a150": [ 1, {} ], "a151": [ 1, {} ], "a152": [ 1, {} ], "a153": [ 1, {} ], "a154": [ 1, {} ], "a155": [ 1, {} ], "a156": [ 1, {} ], "a157": [ 1, {} ], "a158": [ 1, {} ], "a159": [ 1, {} ], "a160": [ 1, {} ], "a161": [ 1, {} ], "a162": [ 1, {} ], "a163": [ 1, {} ], "a164": [ 1, {} ], "a165": [ 1, {} ], "a166": [ 1, {} ], "a167": [ 1, {} ], "a168": [ 1, {} ], "a169": [ 1, {} ], "a170": [ 1, {} ], "a171": [ 1, {} ], "a172": [ 1, {} ], "a173": [ 1, {} ], "a174": [ 1, {} ], "a175": [ 1, {} ], "a176": [ 1, {} ], "a177": [ 1, {} ], "a178": [ 1, {} ], "a179": [ 1, {} ], "a180": [ 1, {} ], "a181": [ 1, {} ], "a182": [ 1, {} ], "a183": [ 1, {} ], "a184": [ 1, {} ], "a185": [ 1, {} ], "a186": [ 1, {} ], "a187": [ 1, {} ], "a188": [ 1, {} ], "a189": [ 1, {} ], "a190": [ 1, {} ], "a191": [ 1, {} ], "a192": [ 1, {} ], "a193": [ 1, {} ], "a194": [ 1, {} ], "a195": [ 1, {} ], "a196": [ 1, {} ], "a197": [ 1, {} ], "a198": [ 1, {} ], "a199": [ 1, {} ], "a200": [ 1, {} ], "a201": [ 1, {} ], "a202": [ 1, {} ], "a203": [ 1, {} ], "a204": [ 1, {} ], "a205": [ 1, {} ], "a206": [ 1, {} ], "a207": [ 1, {} ], "a208": [ 1, {} ], "a209": [ 1, {} ], "a210": [ 1, {} ], "a211": [ 1, {} ], "a212": [ 1, {} ], "a213": [ 1, {} ], "a214": [ 1, {} ], "a215": [ 1, {} ], "a216": [ 1, {} ], "a217": [ 1, {} ], "a218": [ 1, {} ], "a219": [ 1, {} ], "a220": [ 1, {} ], "a221": [ 1, {} ], "a222": [ 1, {} ], "a223": [ 1, {} ], "a224": [ 1, {} ], "a225": [ 1, {} ], "a226": [ 1, {} ], "a227": [ 1, {} ], "a228": [ 1, {} ], "a229": [ 1, {} ], "a230": [ 1, {} ], "a231": [ 1, {} ], "a232": [ 1, {} ], "a233": [ 1, {} ], "a234": [ 1, {} ], "a235": [ 1, {} ], "a236": [ 1, {} ], "a237": [ 1, {} ], "a238": [ 1, {} ], "a239": [ 1, {} ], "a240": [ 1, {} ], "a241": [ 1, {} ], "a242": [ 1, {} ], "a243": [ 1, {} ], "a244": [ 1, {} ], "a245": [ 1, {} ], "a246": [ 1, {} ], "a247": [ 1, {} ], "a248": [ 1, {} ], "a249": [ 1, {} ], "a250": [ 1, {} ], "a251": [ 1, {} ], "a252": [ 1, {} ], "a253": [ 1, {} ], "a254": [ 1, {} ], "a255": [ 1, {} ], "a256": [ 1, {} ], "a257": [ 1, {} ], "a258": [ 1, {} ], "a259": [ 1, {} ], "a260": [ 1, {} ], "a261": [ 1, {} ], "a262": [ 1, {} ], "a263": [ 1, {} ], "a264": [ 1, {} ], "a265": [ 1, {} ], "a266": [ 1, {} ], "a267": [ 1, {} ], "a268": [ 1, {} ], "a269": [ 1, {} ], "a270": [ 1, {} ], "a271": [ 1, {} ], "a272": [ 1, {} ], "a273": [ 1, {} ], "a274": [ 1, {} ], "a275": [ 1, {} ], "a276": [ 1, {} ], "a277": [ 1, {} ], "a278": [ 1, {} ], "a279": [ 1, {} ], "a280": [ 1, {} ], "a281": [ 1, {} ], "a282": [ 1, {} ], "a283": [ 1, {} ], "a284": [ 1, {} ], "a285": [ 1, {} ], "a286": [ 1, {} ], "a287": [ 1, {} ], "a288": [ 1, {} ], "a289": [ 1, {} ], "a290": [ 1, {} ], "a291": [ 1, {} ], "a292": [ 1, {} ], "a293": [ 1, {} ], "a294": [ 1, {} ], "a295": [ 1, {} ], "a296": [ 1, {} ], "a297": [ 1, {} ], "a298": [ 1, {} ], "a299": [ 1, {} ], "a300": [ 1, {} ], "a301": [ 1, {} ], "a302": [ 1, {} ], "a303": [ 1, {} ], "a304": [ 1, {} ], "a305": [ 1, {} ], "a306": [ 1, {} ], "a307": [ 1, {} ], "a308": [ 1, {} ], "a309": [ 1, {} ], "a310": [ 1, {} ], "a311": [ 1, {} ], "a312": [ 1, {} ], "a313": [ 1, {} ], "a314": [ 1, {} ], "a315": [ 1, {} ], "a316": [ 1, {} ], "a317": [ 1, {} ], "a318": [ 1, {} ], "a319": [ 1, {} ], "a320": [ 1, {} ], "a321": [ 1, {} ], "a322": [ 1, {} ], "a323": [ 1, {} ], "a324": [ 1, {} ], "a325": [ 1, {} ], "a326": [ 1, {} ], "a327": [ 1, {} ], "a328": [ 1, {} ], "a329": [ 1, {} ], "a330": [ 1, {} ], "a331": [ 1, {} ], "a332": [ 1, {} ], "a333": [ 1, {} ], "a334": [ 1, {} ], "a335": [ 1, {} ], "a336": [ 1, {} ], "a337": [ 1, {} ], "a338": [ 1, {} ], "a339": [ 1, {} ], "a340": [ 1, {} ], "a341": [ 1, {} ], "a342": [ 1, {} ], "a343": [ 1, {} ], "a344": [ 1, {} ], "a345": [ 1, {} ], "a346": [ 1, {} ], "a347": [ 1, {} ], "a348": [ 1, {} ], "a349": [ 1, {} ], "a350": [ 1, {} ], "a351": [ 1, {} ], "a352": [ 1, {} ], "a353": [ 1, {} ], "a354": [ 1, {} ], "a355": [ 1, {} ], "a356": [ 1, {} ], "a357": [ 1, {} ], "a358": [ 1, {} ], "a359": [ 1, {} ], "a360": [ 1, {} ], "a361": [ 1, {} ], "a362": [ 1, {} ], "a363": [ 1, {} ], "a364": [ 1, {} ], "a365": [ 1, {} ], "a366": [ 1, {} ], "a367": [ 1, {} ], "a368": [ 1, {} ], "a369": [ 1, {} ], "a370": [ 1, {} ], "a371": [ 1, {} ], "a372": [ 1, {} ], "a373": [ 1, {} ], "a374": [ 1, {} ], "a375": [ 1, {} ], "a376": [ 1, {} ], "a377": [ 1, {} ], "a378": [ 1, {} ], "a379": [ 1, {} ], "a380": [ 1, {} ], "a381": [ 1, {} ], "a382": [ 1, {} ], "a383": [ 1, {} ], "a384": [ 1, {} ], "a385": [ 1, {} ], "a386": [ 1, {} ], "a387": [ 1, {} ], "a388": [ 1, {} ], "a389": [ 1, {} ], "a390": [ 1, {} ], "a391": [ 1, {} ], "a392": [ 1, {} ], "a393": [ 1, {} ], "a394": [ 1, {} ], "a395": [ 1, {} ], "a396": [ 1, {} ], "a397": [ 1, {} ], "a398": [ 1, {} ], "a399": [ 1, {} ], "a400": [ 1, {} ], "a401": [ 1, {} ], "a402": [ 1, {} ], "a403": [ 1, {} ], "a404": [ 1, {} ], "a405": [ 1, {} ], "a406": [ 1, {} ], "a407": [ 1, {} ], "a408": [ 1, {} ], "a409": [ 1, {} ], "a410": [ 1, {} ], "a411": [ 1, {} ], "a412": [ 1, {} ], "a413": [ 1, {} ], "a414": [ 1, {} ], "a415": [ 1, {} ], "a416": [ 1, {} ], "a417": [ 1, {} ], "a418": [ 1, {} ], "a419": [ 1, {} ], "a420": [ 1, {} ], "a421": [ 1, {} ], "a422": [ 1, {} ], "a423": [ 1, {} ], "a424": [ 1, {} ], "a425": [ 1, {} ], "a426": [ 1, {} ], "a427": [ 1, {} ], "a428": [ 1, {} ], "a429": [ 1, {} ], "a430": [ 1, {} ], "a431": [ 1, {} ], "a432": [ 1, {} ], "a433": [ 1, {} ], "a434": [ 1, {} ], "a435": [ 1, {} ], "a436": [ 1, {} ], "a437": [ 1, {} ], "a438": [ 1, {} ], "a439": [ 1, {} ], "a440": [ 1, {} ], "a441": [ 1, {} ], "a442": [ 1, {} ], "a443": [ 1, {} ], "a444": [ 1, {} ], "a445": [ 1, {} ], "a446": [ 1, {} ], "a447": [ 1, {} ], "a448": [ 1, {} ], "a449": [ 1, {} ], "a450": [ 1, {} ], "a451": [ 1, {} ], "a452": [ 1, {} ], "a453": [ 1, {} ], "a454": [ 1, {} ], "a455": [ 1, {} ], "a456": [ 1, {} ], "a457": [ 1, {} ], "a458": [ 1, {} ], "a459": [ 1, {} ], "a460": [ 1, {} ], "a461": [ 1, {} ], "a462": [ 1, {} ], "a463": [ 1, {} ], "a464": [ 1, {} ], "a465": [ 1, {} ], "a466": [ 1, {} ], "a467": [ 1, {} ], "a468": [ 1, {} ], "a469": [ 1, {} ], "a470": [ 1, {} ], "a471": [ 1, {} ], "a472": [ 1, {} ], "a473": [ 1, {} ], "a474": [ 1, {} ], "a475": [ 1, {} ], "a476": [ 1, {} ], "a477": [ 1, {} ], "a478": [ 1, {} ], "a479": [ 1, {} ], "a480": [ 1, {} ], "a481": [ 1, {} ], "a482": [ 1, {} ], "a483": [ 1, {} ], "a484": [ 1, {} ], "a485": [ 1, {} ], "a486": [ 1, {} ], "a487": [ 1, {} ], "a488": [ 1, {} ], "a489": [ 1, {} ], "a490": [ 1, {} ], "a491": [ 1, {} ], "a492": [ 1, {} ], "a493": [ 1, {} ], "a494": [ 1, {} ], "a495": [ 1, {} ], "a496": [ 1, {} ], "a497": [ 1, {} ], "a498": [ 1, {} ], "a499": [ 1, {} ], "a500": [ 1, {} ], "a501": [ 1, {} ], "a502": [ 1, {} ], "a503": [ 1, {} ], "a504": [ 1, {} ], "a505": [ 1, {} ], "a506": [ 1, {} ], "a507": [ 1, {} ], "a508": [ 1, {} ], "a509": [ 1, {} ], "a510": [ 1, {} ], "a511": [ 1, {} ], "a512": [ 1, {} ], "a513": [ 1, {} ], "a514": [ 1, {} ], "a515": [ 1, {} ], "a516": [ 1, {} ], "a517": [ 1, {} ], "a518": [ 1, {} ], "a519": [ 1, {} ], "a520": [ 1, {} ], "a521": [ 1, {} ], "a522": [ 1, {} ], "a523": [ 1, {} ], "a524": [ 1, {} ], "a525": [ 1, {} ], "a526": [ 1, {} ], "a527": [ 1, {} ], "a528": [ 1, {} ], "a529": [ 1, {} ], "a530": [ 1, {} ], "a531": [ 1, {} ], "a532": [ 1, {} ], "a533": [ 1, {} ], "a534": [ 1, {} ], "a535": [ 1, {} ], "a536": [ 1, {} ], "a537": [ 1, {} ], "a538": [ 1, {} ], "a539": [ 1, {} ], "a540": [ 1, {} ], "a541": [ 1, {} ], "a542": [ 1, {} ], "a543": [ 1, {} ], "a544": [ 1, {} ], "a545": [ 1, {} ], "a546": [ 1, {} ], "a547": [ 1, {} ], "a548": [ 1, {} ], "a549": [ 1, {} ], "a550": [ 1, {} ], "a551": [ 1, {} ], "a552": [ 1, {} ], "a553": [ 1, {} ], "a554": [ 1, {} ], "a555": [ 1, {} ], "a556": [ 1, {} ], "a557": [ 1, {} ], "a558": [ 1, {} ], "a559": [ 1, {} ], "a560": [ 1, {} ], "a561": [ 1, {} ], "a562": [ 1, {} ], "a563": [ 1, {} ], "a564": [ 1, {} ], "a565": [ 1, {} ], "a566": [ 1, {} ], "a567": [ 1, {} ], "a568": [ 1, {} ], "a569": [ 1, {} ], "a570": [ 1, {} ], "a571": [ 1, {} ], "a572": [ 1, {} ], "a573": [ 1, {} ], "a574": [ 1, {} ], "a575": [ 1, {} ], "a576": [ 1, {} ], "a577": [ 1, {} ], "a578": [ 1, {} ], "a579": [ 1, {} ], "a580": [ 1, {} ], "a581": [ 1, {} ], "a582": [ 1, {} ], "a583": [ 1, {} ], "a584": [ 1, {} ], "a585": [ 1, {} ], "a586": [ 1, {} ], "a587": [ 1, {} ], "a588": [ 1, {} ], "a589": [ 1, {} ], "a590": [ 1, {} ], "a591": [ 1, {} ], "a592": [ 1, {} ], "a593": [ 1, {} ], "a594": [ 1, {} ], "a595": [ 1, {} ], "a596": [ 1, {} ], "a597": [ 1, {} ], "a598": [ 1, {} ], "a599": [ 1, {} ], "a600": [ 1, {} ], "a601": [ 1, {} ], "a602": [ 1, {} ], "a603": [ 1, {} ], "a604": [ 1, {} ], "a605": [ 1, {} ], "a606": [ 1, {} ], "a607": [ 1, {} ], "a608": [ 1, {} ], "a609": [ 1, {} ], "a610": [ 1, {} ], "a611": [ 1, {} ], "a612": [ 1, {} ], "a613": [ 1, {} ], "a614": [ 1, {} ], "a615": [ 1, {} ], "a616": [ 1, {} ], "a617": [ 1, {} ], "a618": [ 1, {} ], "a619": [ 1, {} ], "a620": [ 1, {} ], "a621": [ 1, {} ], "a622": [ 1, {} ], "a623": [ 1, {} ], "a624": [ 1, {} ], "a625": [ 1, {} ], "a626": [ 1, {} ], "a627": [ 1, {} ], "a628": [ 1, {} ], "a629": [ 1, {} ], "a630": [ 1, {} ], "a631": [ 1, {} ], "a632": [ 1, {} ], "a633": [ 1, {} ], "a634": [ 1, {} ], "a635": [ 1, {} ], "a636": [ 1, {} ], "a637": [ 1, {} ], "a638": [ 1, {} ], "a639": [ 1, {} ], "a640": [ 1, {} ], "a641": [ 1, {} ], "a642": [ 1, {} ], "a643": [ 1, {} ], "a644": [ 1, {} ], "a645": [ 1, {} ], "a646": [ 1, {} ], "a647": [ 1, {} ], "a648": [ 1, {} ], "a649": [ 1, {} ], "a650": [ 1, {} ], "a651": [ 1, {} ], "a652": [ 1, {} ], "a653": [ 1, {} ], "a654": [ 1, {} ], "a655": [ 1, {} ], "a656": [ 1, {} ], "a657": [ 1, {} ], "a658": [ 1, {} ], "a659": [ 1, {} ], "a660": [ 1, {} ], "a661": [ 1, {} ], "a662": [ 1, {} ], "a663": [ 1, {} ], "a664": [ 1, {} ], "a665": [ 1, {} ], "a666": [ 1, {} ], "a667": [ 1, {} ], "a668": [ 1, {} ], "a669": [ 1, {} ], "a670": [ 1, {} ], "a671": [ 1, {} ], "a672": [ 1, {} ], "a673": [ 1, {} ], "a674": [ 1, {} ], "a675": [ 1, {} ], "a676": [ 1, {} ], "a677": [ 1, {} ], "a678": [ 1, {} ], "a679": [ 1, {} ], "a680": [ 1, {} ], "a681": [ 1, {} ], "a682": [ 1, {} ], "a683": [ 1, {} ], "a684": [ 1, {} ], "a685": [ 1, {} ], "a686": [ 1, {} ], "a687": [ 1, {} ], "a688": [ 1, {} ], "a689": [ 1, {} ], "a690": [ 1, {} ], "a691": [ 1, {} ], "a692": [ 1, {} ], "a693": [ 1, {} ], "a694": [ 1, {} ], "a695": [ 1, {} ], "a696": [ 1, {} ], "a697": [ 1, {} ], "a698": [ 1, {} ], "a699": [ 1, {} ], "a700": [ 1, {} ], "a701": [ 1, {} ], "a702": [ 1, {} ], "a703": [ 1, {} ], "a704": [ 1, {} ], "a705": [ 1, {} ], "a706": [ 1, {} ], "a707": [ 1, {} ], "a708": [ 1, {} ], "a709": [ 1, {} ], "a710": [ 1, {} ], "a711": [ 1, {} ], "a712": [ 1, {} ], "a713": [ 1, {} ], "a714": [ 1, {} ], "a715": [ 1, {} ], "a716": [ 1, {} ], "a717": [ 1, {} ], "a718": [ 1, {} ], "a719": [ 1, {} ], "a720": [ 1, {} ], "a721": [ 1, {} ], "a722": [ 1, {} ], "a723": [ 1, {} ], "a724": [ 1, {} ], "a725": [ 1, {} ], "a726": [ 1, {} ], "a727": [ 1, {} ], "a728": [ 1, {} ], "a729": [ 1, {} ], "a730": [ 1, {} ], "a731": [ 1, {} ], "a732": [ 1, {} ], "a733": [ 1, {} ], "a734": [ 1, {} ], "a735": [ 1, {} ], "a736": [ 1, {} ], "a737": [ 1, {} ], "a738": [ 1, {} ], "a739": [ 1, {} ], "a740": [ 1, {} ], "a741": [ 1, {} ], "a742": [ 1, {} ], "a743": [ 1, {} ], "a744": [ 1, {} ], "a745": [ 1, {} ], "a746": [ 1, {} ], "a747": [ 1, {} ], "a748": [ 1, {} ], "a749": [ 1, {} ], "a750": [ 1, {} ], "a751": [ 1, {} ], "a752": [ 1, {} ], "a753": [ 1, {} ], "a754": [ 1, {} ], "a755": [ 1, {} ], "a756": [ 1, {} ], "a757": [ 1, {} ], "a758": [ 1, {} ], "a759": [ 1, {} ], "a760": [ 1, {} ], "a761": [ 1, {} ], "a762": [ 1, {} ], "a763": [ 1, {} ], "a764": [ 1, {} ], "a765": [ 1, {} ], "a766": [ 1, {} ], "a767": [ 1, {} ], "a768": [ 1, {} ], "a769": [ 1, {} ], "a770": [ 1, {} ], "a771": [ 1, {} ], "a772": [ 1, {} ], "a773": [ 1, {} ], "a774": [ 1, {} ], "a775": [ 1, {} ], "a776": [ 1, {} ], "a777": [ 1, {} ], "a778": [ 1, {} ], "a779": [ 1, {} ], "a780": [ 1, {} ], "a781": [ 1, {} ], "a782": [ 1, {} ], "a783": [ 1, {} ], "a784": [ 1, {} ], "a785": [ 1, {} ], "a786": [ 1, {} ], "a787": [ 1, {} ], "a788": [ 1, {} ], "a789": [ 1, {} ], "a790": [ 1, {} ], "a791": [ 1, {} ], "a792": [ 1, {} ], "a793": [ 1, {} ], "a794": [ 1, {} ], "a795": [ 1, {} ], "a796": [ 1, {} ], "a797": [ 1, {} ], "a798": [ 1, {} ], "a799": [ 1, {} ], "a800": [ 1, {} ], "a801": [ 1, {} ], "a802": [ 1, {} ], "a803": [ 1, {} ], "a804": [ 1, {} ], "a805": [ 1, {} ], "a806": [ 1, {} ], "a807": [ 1, {} ], "a808": [ 1, {} ], "a809": [ 1, {} ], "a810": [ 1, {} ], "a811": [ 1, {} ], "a812": [ 1, {} ], "a813": [ 1, {} ], "a814": [ 1, {} ], "a815": [ 1, {} ], "a816": [ 1, {} ], "a817": [ 1, {} ], "a818": [ 1, {} ], "a819": [ 1, {} ], "a820": [ 1, {} ], "a821": [ 1, {} ], "a822": [ 1, {} ], "a823": [ 1, {} ], "a824": [ 1, {} ], "a825": [ 1, {} ], "a826": [ 1, {} ], "a827": [ 1, {} ], "a828": [ 1, {} ], "a829": [ 1, {} ], "a830": [ 1, {} ], "a831": [ 1, {} ], "a832": [ 1, {} ], "a833": [ 1, {} ], "a834": [ 1, {} ], "a835": [ 1, {} ], "a836": [ 1, {} ], "a837": [ 1, {} ], "a838": [ 1, {} ], "a839": [ 1, {} ], "a840": [ 1, {} ], "a841": [ 1, {} ], "a842": [ 1, {} ], "a843": [ 1, {} ], "a844": [ 1, {} ], "a845": [ 1, {} ], "a846": [ 1, {} ], "a847": [ 1, {} ], "a848": [ 1, {} ], "a849": [ 1, {} ], "a850": [ 1, {} ], "a851": [ 1, {} ], "a852": [ 1, {} ], "a853": [ 1, {} ], "a854": [ 1, {} ], "a855": [ 1, {} ], "a856": [ 1, {} ], "a857": [ 1, {} ], "a858": [ 1, {} ], "a859": [ 1, {} ], "a860": [ 1, {} ], "a861": [ 1, {} ], "a862": [ 1, {} ], "a863": [ 1, {} ], "a864": [ 1, {} ], "a865": [ 1, {} ], "a866": [ 1, {} ], "a867": [ 1, {} ], "a868": [ 1, {} ], "a869": [ 1, {} ], "a870": [ 1, {} ], "a871": [ 1, {} ], "a872": [ 1, {} ], "a873": [ 1, {} ], "a874": [ 1, {} ], "a875": [ 1, {} ], "a876": [ 1, {} ], "a877": [ 1, {} ], "a878": [ 1, {} ], "a879": [ 1, {} ], "a880": [ 1, {} ], "a881": [ 1, {} ], "a882": [ 1, {} ], "a883": [ 1, {} ], "a884": [ 1, {} ], "a885": [ 1, {} ], "a886": [ 1, {} ], "a887": [ 1, {} ], "a888": [ 1, {} ], "a889": [ 1, {} ], "a890": [ 1, {} ], "a891": [ 1, {} ], "a892": [ 1, {} ], "a893": [ 1, {} ], "a894": [ 1, {} ], "a895": [ 1, {} ], "a896": [ 1, {} ], "a897": [ 1, {} ], "a898": [ 1, {} ], "a899": [ 1, {} ], "a900": [ 1, {} ], "a901": [ 1, {} ], "a902": [ 1, {} ], "a903": [ 1, {} ], "a904": [ 1, {} ], "a905": [ 1, {} ], "a906": [ 1, {} ], "a907": [ 1, {} ], "a908": [ 1, {} ], "a909": [ 1, {} ], "a910": [ 1, {} ], "a911": [ 1, {} ], "a912": [ 1, {} ], "a913": [ 1, {} ], "a914": [ 1, {} ], "a915": [ 1, {} ], "a916": [ 1, {} ], "a917": [ 1, {} ], "a918": [ 1, {} ], "a919": [ 1, {} ], "a920": [ 1, {} ], "a921": [ 1, {} ], "a922": [ 1, {} ], "a923": [ 1, {} ], "a924": [ 1, {} ], "a925": [ 1, {} ], "a926": [ 1, {} ], "a927": [ 1, {} ], "a928": [ 1, {} ], "a929": [ 1, {} ], "a930": [ 1, {} ], "a931": [ 1, {} ], "a932": [ 1, {} ], "a933": [ 1, {} ], "a934": [ 1, {} ], "a935": [ 1, {} ], "a936": [ 1, {} ], "a937": [ 1, {} ], "a938": [ 1, {} ], "a939": [ 1, {} ], "a940": [ 1, {} ], "a941": [ 1, {} ], "a942": [ 1, {} ], "a943": [ 1, {} ], "a944": [ 1, {} ], "a945": [ 1, {} ], "a946": [ 1, {} ], "a947": [ 1, {} ], "a948": [ 1, {} ], "a949": [ 1, {} ], "a950": [ 1, {} ], "a951": [ 1, {} ], "a952": [ 1, {} ], "a953": [ 1, {} ], "a954": [ 1, {} ], "a955": [ 1, {} ], "a956": [ 1, {} ], "a957": [ 1, {} ], "a958": [ 1, {} ], "a959": [ 1, {} ], "a960": [ 1, {} ], "a961": [ 1, {} ], "a962": [ 1, {} ], "a963": [ 1, {} ], "a964": [ 1, {} ], "a965": [ 1, {} ], "a966": [ 1, {} ], "a967": [ 1, {} ], "a968": [ 1, {} ], "a969": [ 1, {} ], "a970": [ 1, {} ], "a971": [ 1, {} ], "a972": [ 1, {} ], "a973": [ 1, {} ], "a974": [ 1, {} ], "a975": [ 1, {} ], "a976": [ 1, {} ], "a977": [ 1, {} ], "a978": [ 1, {} ], "a979": [ 1, {} ], "a980": [ 1, {} ], "a981": [ 1, {} ], "a982": [ 1, {} ], "a983": [ 1, {} ], "a984": [ 1, {} ], "a985": [ 1, {} ], "a986": [ 1, {} ], "a987": [ 1, {} ], "a988": [ 1, {} ], "a989": [ 1, {} ], "a990": [ 1, {} ], "a991": [ 1, {} ], "a992": [ 1, {} ], "a993": [ 1, {} ], "a994": [ 1, {} ], "a995": [ 1, {} ], "a996": [ 1, {} ], "a997": [ 1, {} ], "a998": [ 1, {} ], "a999": [ 1, {} ], "a1000": [ 1, {} ], "a1001": [ 1, {} ], "a1002": [ 1, {} ], "a1003": [ 1, {} ], "a1004": [ 1, {} ], "a1005": [ 1, {} ], "a1006": [ 1, {} ], "a1007": [ 1, {} ], "a1008": [ 1, {} ], "a1009": [ 1, {} ], "a1010": [ 1, {} ], "a1011": [ 1, {} ], "a1012": [ 1, {} ], "a1013": [ 1, {} ], "a1014": [ 1, {} ], "a1015": [ 1, {} ], "a1016": [ 1, {} ], "a1017": [ 1, {} ], "a1018": [ 1, {} ], "a1019": [ 1, {} ], "a1020": [ 1, {} ], "a1021": [ 1, {} ], "a1022": [ 1, {} ], "a1023": [ 1, {} ] } }, { "name": "large dictionary key", "raw": [ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=1" ], "header_type": "dictionary", "expected": { "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": [ 1, {} ] } }, { "name": "large list", "raw": [ "a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a58, a59, a60, a61, a62, a63, a64, a65, a66, a67, a68, a69, a70, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80, a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, a91, a92, a93, a94, a95, a96, a97, a98, a99, a100, a101, a102, a103, a104, a105, a106, a107, a108, a109, a110, a111, a112, a113, a114, a115, a116, a117, a118, a119, a120, a121, a122, a123, a124, a125, a126, a127, a128, a129, a130, a131, a132, a133, a134, a135, a136, a137, a138, a139, a140, a141, a142, a143, a144, a145, a146, a147, a148, a149, a150, a151, a152, a153, a154, a155, a156, a157, a158, a159, a160, a161, a162, a163, a164, a165, a166, a167, a168, a169, a170, a171, a172, a173, a174, a175, a176, a177, a178, a179, a180, a181, a182, a183, a184, a185, a186, a187, a188, a189, a190, a191, a192, a193, a194, a195, a196, a197, a198, a199, a200, a201, a202, a203, a204, a205, a206, a207, a208, a209, a210, a211, a212, a213, a214, a215, a216, a217, a218, a219, a220, a221, a222, a223, a224, a225, a226, a227, a228, a229, a230, a231, a232, a233, a234, a235, a236, a237, a238, a239, a240, a241, a242, a243, a244, a245, a246, a247, a248, a249, a250, a251, a252, a253, a254, a255, a256, a257, a258, a259, a260, a261, a262, a263, a264, a265, a266, a267, a268, a269, a270, a271, a272, a273, a274, a275, a276, a277, a278, a279, a280, a281, a282, a283, a284, a285, a286, a287, a288, a289, a290, a291, a292, a293, a294, a295, a296, a297, a298, a299, a300, a301, a302, a303, a304, a305, a306, a307, a308, a309, a310, a311, a312, a313, a314, a315, a316, a317, a318, a319, a320, a321, a322, a323, a324, a325, a326, a327, a328, a329, a330, a331, a332, a333, a334, a335, a336, a337, a338, a339, a340, a341, a342, a343, a344, a345, a346, a347, a348, a349, a350, a351, a352, a353, a354, a355, a356, a357, a358, a359, a360, a361, a362, a363, a364, a365, a366, a367, a368, a369, a370, a371, a372, a373, a374, a375, a376, a377, a378, a379, a380, a381, a382, a383, a384, a385, a386, a387, a388, a389, a390, a391, a392, a393, a394, a395, a396, a397, a398, a399, a400, a401, a402, a403, a404, a405, a406, a407, a408, a409, a410, a411, a412, a413, a414, a415, a416, a417, a418, a419, a420, a421, a422, a423, a424, a425, a426, a427, a428, a429, a430, a431, a432, a433, a434, a435, a436, a437, a438, a439, a440, a441, a442, a443, a444, a445, a446, a447, a448, a449, a450, a451, a452, a453, a454, a455, a456, a457, a458, a459, a460, a461, a462, a463, a464, a465, a466, a467, a468, a469, a470, a471, a472, a473, a474, a475, a476, a477, a478, a479, a480, a481, a482, a483, a484, a485, a486, a487, a488, a489, a490, a491, a492, a493, a494, a495, a496, a497, a498, a499, a500, a501, a502, a503, a504, a505, a506, a507, a508, a509, a510, a511, a512, a513, a514, a515, a516, a517, a518, a519, a520, a521, a522, a523, a524, a525, a526, a527, a528, a529, a530, a531, a532, a533, a534, a535, a536, a537, a538, a539, a540, a541, a542, a543, a544, a545, a546, a547, a548, a549, a550, a551, a552, a553, a554, a555, a556, a557, a558, a559, a560, a561, a562, a563, a564, a565, a566, a567, a568, a569, a570, a571, a572, a573, a574, a575, a576, a577, a578, a579, a580, a581, a582, a583, a584, a585, a586, a587, a588, a589, a590, a591, a592, a593, a594, a595, a596, a597, a598, a599, a600, a601, a602, a603, a604, a605, a606, a607, a608, a609, a610, a611, a612, a613, a614, a615, a616, a617, a618, a619, a620, a621, a622, a623, a624, a625, a626, a627, a628, a629, a630, a631, a632, a633, a634, a635, a636, a637, a638, a639, a640, a641, a642, a643, a644, a645, a646, a647, a648, a649, a650, a651, a652, a653, a654, a655, a656, a657, a658, a659, a660, a661, a662, a663, a664, a665, a666, a667, a668, a669, a670, a671, a672, a673, a674, a675, a676, a677, a678, a679, a680, a681, a682, a683, a684, a685, a686, a687, a688, a689, a690, a691, a692, a693, a694, a695, a696, a697, a698, a699, a700, a701, a702, a703, a704, a705, a706, a707, a708, a709, a710, a711, a712, a713, a714, a715, a716, a717, a718, a719, a720, a721, a722, a723, a724, a725, a726, a727, a728, a729, a730, a731, a732, a733, a734, a735, a736, a737, a738, a739, a740, a741, a742, a743, a744, a745, a746, a747, a748, a749, a750, a751, a752, a753, a754, a755, a756, a757, a758, a759, a760, a761, a762, a763, a764, a765, a766, a767, a768, a769, a770, a771, a772, a773, a774, a775, a776, a777, a778, a779, a780, a781, a782, a783, a784, a785, a786, a787, a788, a789, a790, a791, a792, a793, a794, a795, a796, a797, a798, a799, a800, a801, a802, a803, a804, a805, a806, a807, a808, a809, a810, a811, a812, a813, a814, a815, a816, a817, a818, a819, a820, a821, a822, a823, a824, a825, a826, a827, a828, a829, a830, a831, a832, a833, a834, a835, a836, a837, a838, a839, a840, a841, a842, a843, a844, a845, a846, a847, a848, a849, a850, a851, a852, a853, a854, a855, a856, a857, a858, a859, a860, a861, a862, a863, a864, a865, a866, a867, a868, a869, a870, a871, a872, a873, a874, a875, a876, a877, a878, a879, a880, a881, a882, a883, a884, a885, a886, a887, a888, a889, a890, a891, a892, a893, a894, a895, a896, a897, a898, a899, a900, a901, a902, a903, a904, a905, a906, a907, a908, a909, a910, a911, a912, a913, a914, a915, a916, a917, a918, a919, a920, a921, a922, a923, a924, a925, a926, a927, a928, a929, a930, a931, a932, a933, a934, a935, a936, a937, a938, a939, a940, a941, a942, a943, a944, a945, a946, a947, a948, a949, a950, a951, a952, a953, a954, a955, a956, a957, a958, a959, a960, a961, a962, a963, a964, a965, a966, a967, a968, a969, a970, a971, a972, a973, a974, a975, a976, a977, a978, a979, a980, a981, a982, a983, a984, a985, a986, a987, a988, a989, a990, a991, a992, a993, a994, a995, a996, a997, a998, a999, a1000, a1001, a1002, a1003, a1004, a1005, a1006, a1007, a1008, a1009, a1010, a1011, a1012, a1013, a1014, a1015, a1016, a1017, a1018, a1019, a1020, a1021, a1022, a1023" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "a0" }, {} ], [ { "__type": "token", "value": "a1" }, {} ], [ { "__type": "token", "value": "a2" }, {} ], [ { "__type": "token", "value": "a3" }, {} ], [ { "__type": "token", "value": "a4" }, {} ], [ { "__type": "token", "value": "a5" }, {} ], [ { "__type": "token", "value": "a6" }, {} ], [ { "__type": "token", "value": "a7" }, {} ], [ { "__type": "token", "value": "a8" }, {} ], [ { "__type": "token", "value": "a9" }, {} ], [ { "__type": "token", "value": "a10" }, {} ], [ { "__type": "token", "value": "a11" }, {} ], [ { "__type": "token", "value": "a12" }, {} ], [ { "__type": "token", "value": "a13" }, {} ], [ { "__type": "token", "value": "a14" }, {} ], [ { "__type": "token", "value": "a15" }, {} ], [ { "__type": "token", "value": "a16" }, {} ], [ { "__type": "token", "value": "a17" }, {} ], [ { "__type": "token", "value": "a18" }, {} ], [ { "__type": "token", "value": "a19" }, {} ], [ { "__type": "token", "value": "a20" }, {} ], [ { "__type": "token", "value": "a21" }, {} ], [ { "__type": "token", "value": "a22" }, {} ], [ { "__type": "token", "value": "a23" }, {} ], [ { "__type": "token", "value": "a24" }, {} ], [ { "__type": "token", "value": "a25" }, {} ], [ { "__type": "token", "value": "a26" }, {} ], [ { "__type": "token", "value": "a27" }, {} ], [ { "__type": "token", "value": "a28" }, {} ], [ { "__type": "token", "value": "a29" }, {} ], [ { "__type": "token", "value": "a30" }, {} ], [ { "__type": "token", "value": "a31" }, {} ], [ { "__type": "token", "value": "a32" }, {} ], [ { "__type": "token", "value": "a33" }, {} ], [ { "__type": "token", "value": "a34" }, {} ], [ { "__type": "token", "value": "a35" }, {} ], [ { "__type": "token", "value": "a36" }, {} ], [ { "__type": "token", "value": "a37" }, {} ], [ { "__type": "token", "value": "a38" }, {} ], [ { "__type": "token", "value": "a39" }, {} ], [ { "__type": "token", "value": "a40" }, {} ], [ { "__type": "token", "value": "a41" }, {} ], [ { "__type": "token", "value": "a42" }, {} ], [ { "__type": "token", "value": "a43" }, {} ], [ { "__type": "token", "value": "a44" }, {} ], [ { "__type": "token", "value": "a45" }, {} ], [ { "__type": "token", "value": "a46" }, {} ], [ { "__type": "token", "value": "a47" }, {} ], [ { "__type": "token", "value": "a48" }, {} ], [ { "__type": "token", "value": "a49" }, {} ], [ { "__type": "token", "value": "a50" }, {} ], [ { "__type": "token", "value": "a51" }, {} ], [ { "__type": "token", "value": "a52" }, {} ], [ { "__type": "token", "value": "a53" }, {} ], [ { "__type": "token", "value": "a54" }, {} ], [ { "__type": "token", "value": "a55" }, {} ], [ { "__type": "token", "value": "a56" }, {} ], [ { "__type": "token", "value": "a57" }, {} ], [ { "__type": "token", "value": "a58" }, {} ], [ { "__type": "token", "value": "a59" }, {} ], [ { "__type": "token", "value": "a60" }, {} ], [ { "__type": "token", "value": "a61" }, {} ], [ { "__type": "token", "value": "a62" }, {} ], [ { "__type": "token", "value": "a63" }, {} ], [ { "__type": "token", "value": "a64" }, {} ], [ { "__type": "token", "value": "a65" }, {} ], [ { "__type": "token", "value": "a66" }, {} ], [ { "__type": "token", "value": "a67" }, {} ], [ { "__type": "token", "value": "a68" }, {} ], [ { "__type": "token", "value": "a69" }, {} ], [ { "__type": "token", "value": "a70" }, {} ], [ { "__type": "token", "value": "a71" }, {} ], [ { "__type": "token", "value": "a72" }, {} ], [ { "__type": "token", "value": "a73" }, {} ], [ { "__type": "token", "value": "a74" }, {} ], [ { "__type": "token", "value": "a75" }, {} ], [ { "__type": "token", "value": "a76" }, {} ], [ { "__type": "token", "value": "a77" }, {} ], [ { "__type": "token", "value": "a78" }, {} ], [ { "__type": "token", "value": "a79" }, {} ], [ { "__type": "token", "value": "a80" }, {} ], [ { "__type": "token", "value": "a81" }, {} ], [ { "__type": "token", "value": "a82" }, {} ], [ { "__type": "token", "value": "a83" }, {} ], [ { "__type": "token", "value": "a84" }, {} ], [ { "__type": "token", "value": "a85" }, {} ], [ { "__type": "token", "value": "a86" }, {} ], [ { "__type": "token", "value": "a87" }, {} ], [ { "__type": "token", "value": "a88" }, {} ], [ { "__type": "token", "value": "a89" }, {} ], [ { "__type": "token", "value": "a90" }, {} ], [ { "__type": "token", "value": "a91" }, {} ], [ { "__type": "token", "value": "a92" }, {} ], [ { "__type": "token", "value": "a93" }, {} ], [ { "__type": "token", "value": "a94" }, {} ], [ { "__type": "token", "value": "a95" }, {} ], [ { "__type": "token", "value": "a96" }, {} ], [ { "__type": "token", "value": "a97" }, {} ], [ { "__type": "token", "value": "a98" }, {} ], [ { "__type": "token", "value": "a99" }, {} ], [ { "__type": "token", "value": "a100" }, {} ], [ { "__type": "token", "value": "a101" }, {} ], [ { "__type": "token", "value": "a102" }, {} ], [ { "__type": "token", "value": "a103" }, {} ], [ { "__type": "token", "value": "a104" }, {} ], [ { "__type": "token", "value": "a105" }, {} ], [ { "__type": "token", "value": "a106" }, {} ], [ { "__type": "token", "value": "a107" }, {} ], [ { "__type": "token", "value": "a108" }, {} ], [ { "__type": "token", "value": "a109" }, {} ], [ { "__type": "token", "value": "a110" }, {} ], [ { "__type": "token", "value": "a111" }, {} ], [ { "__type": "token", "value": "a112" }, {} ], [ { "__type": "token", "value": "a113" }, {} ], [ { "__type": "token", "value": "a114" }, {} ], [ { "__type": "token", "value": "a115" }, {} ], [ { "__type": "token", "value": "a116" }, {} ], [ { "__type": "token", "value": "a117" }, {} ], [ { "__type": "token", "value": "a118" }, {} ], [ { "__type": "token", "value": "a119" }, {} ], [ { "__type": "token", "value": "a120" }, {} ], [ { "__type": "token", "value": "a121" }, {} ], [ { "__type": "token", "value": "a122" }, {} ], [ { "__type": "token", "value": "a123" }, {} ], [ { "__type": "token", "value": "a124" }, {} ], [ { "__type": "token", "value": "a125" }, {} ], [ { "__type": "token", "value": "a126" }, {} ], [ { "__type": "token", "value": "a127" }, {} ], [ { "__type": "token", "value": "a128" }, {} ], [ { "__type": "token", "value": "a129" }, {} ], [ { "__type": "token", "value": "a130" }, {} ], [ { "__type": "token", "value": "a131" }, {} ], [ { "__type": "token", "value": "a132" }, {} ], [ { "__type": "token", "value": "a133" }, {} ], [ { "__type": "token", "value": "a134" }, {} ], [ { "__type": "token", "value": "a135" }, {} ], [ { "__type": "token", "value": "a136" }, {} ], [ { "__type": "token", "value": "a137" }, {} ], [ { "__type": "token", "value": "a138" }, {} ], [ { "__type": "token", "value": "a139" }, {} ], [ { "__type": "token", "value": "a140" }, {} ], [ { "__type": "token", "value": "a141" }, {} ], [ { "__type": "token", "value": "a142" }, {} ], [ { "__type": "token", "value": "a143" }, {} ], [ { "__type": "token", "value": "a144" }, {} ], [ { "__type": "token", "value": "a145" }, {} ], [ { "__type": "token", "value": "a146" }, {} ], [ { "__type": "token", "value": "a147" }, {} ], [ { "__type": "token", "value": "a148" }, {} ], [ { "__type": "token", "value": "a149" }, {} ], [ { "__type": "token", "value": "a150" }, {} ], [ { "__type": "token", "value": "a151" }, {} ], [ { "__type": "token", "value": "a152" }, {} ], [ { "__type": "token", "value": "a153" }, {} ], [ { "__type": "token", "value": "a154" }, {} ], [ { "__type": "token", "value": "a155" }, {} ], [ { "__type": "token", "value": "a156" }, {} ], [ { "__type": "token", "value": "a157" }, {} ], [ { "__type": "token", "value": "a158" }, {} ], [ { "__type": "token", "value": "a159" }, {} ], [ { "__type": "token", "value": "a160" }, {} ], [ { "__type": "token", "value": "a161" }, {} ], [ { "__type": "token", "value": "a162" }, {} ], [ { "__type": "token", "value": "a163" }, {} ], [ { "__type": "token", "value": "a164" }, {} ], [ { "__type": "token", "value": "a165" }, {} ], [ { "__type": "token", "value": "a166" }, {} ], [ { "__type": "token", "value": "a167" }, {} ], [ { "__type": "token", "value": "a168" }, {} ], [ { "__type": "token", "value": "a169" }, {} ], [ { "__type": "token", "value": "a170" }, {} ], [ { "__type": "token", "value": "a171" }, {} ], [ { "__type": "token", "value": "a172" }, {} ], [ { "__type": "token", "value": "a173" }, {} ], [ { "__type": "token", "value": "a174" }, {} ], [ { "__type": "token", "value": "a175" }, {} ], [ { "__type": "token", "value": "a176" }, {} ], [ { "__type": "token", "value": "a177" }, {} ], [ { "__type": "token", "value": "a178" }, {} ], [ { "__type": "token", "value": "a179" }, {} ], [ { "__type": "token", "value": "a180" }, {} ], [ { "__type": "token", "value": "a181" }, {} ], [ { "__type": "token", "value": "a182" }, {} ], [ { "__type": "token", "value": "a183" }, {} ], [ { "__type": "token", "value": "a184" }, {} ], [ { "__type": "token", "value": "a185" }, {} ], [ { "__type": "token", "value": "a186" }, {} ], [ { "__type": "token", "value": "a187" }, {} ], [ { "__type": "token", "value": "a188" }, {} ], [ { "__type": "token", "value": "a189" }, {} ], [ { "__type": "token", "value": "a190" }, {} ], [ { "__type": "token", "value": "a191" }, {} ], [ { "__type": "token", "value": "a192" }, {} ], [ { "__type": "token", "value": "a193" }, {} ], [ { "__type": "token", "value": "a194" }, {} ], [ { "__type": "token", "value": "a195" }, {} ], [ { "__type": "token", "value": "a196" }, {} ], [ { "__type": "token", "value": "a197" }, {} ], [ { "__type": "token", "value": "a198" }, {} ], [ { "__type": "token", "value": "a199" }, {} ], [ { "__type": "token", "value": "a200" }, {} ], [ { "__type": "token", "value": "a201" }, {} ], [ { "__type": "token", "value": "a202" }, {} ], [ { "__type": "token", "value": "a203" }, {} ], [ { "__type": "token", "value": "a204" }, {} ], [ { "__type": "token", "value": "a205" }, {} ], [ { "__type": "token", "value": "a206" }, {} ], [ { "__type": "token", "value": "a207" }, {} ], [ { "__type": "token", "value": "a208" }, {} ], [ { "__type": "token", "value": "a209" }, {} ], [ { "__type": "token", "value": "a210" }, {} ], [ { "__type": "token", "value": "a211" }, {} ], [ { "__type": "token", "value": "a212" }, {} ], [ { "__type": "token", "value": "a213" }, {} ], [ { "__type": "token", "value": "a214" }, {} ], [ { "__type": "token", "value": "a215" }, {} ], [ { "__type": "token", "value": "a216" }, {} ], [ { "__type": "token", "value": "a217" }, {} ], [ { "__type": "token", "value": "a218" }, {} ], [ { "__type": "token", "value": "a219" }, {} ], [ { "__type": "token", "value": "a220" }, {} ], [ { "__type": "token", "value": "a221" }, {} ], [ { "__type": "token", "value": "a222" }, {} ], [ { "__type": "token", "value": "a223" }, {} ], [ { "__type": "token", "value": "a224" }, {} ], [ { "__type": "token", "value": "a225" }, {} ], [ { "__type": "token", "value": "a226" }, {} ], [ { "__type": "token", "value": "a227" }, {} ], [ { "__type": "token", "value": "a228" }, {} ], [ { "__type": "token", "value": "a229" }, {} ], [ { "__type": "token", "value": "a230" }, {} ], [ { "__type": "token", "value": "a231" }, {} ], [ { "__type": "token", "value": "a232" }, {} ], [ { "__type": "token", "value": "a233" }, {} ], [ { "__type": "token", "value": "a234" }, {} ], [ { "__type": "token", "value": "a235" }, {} ], [ { "__type": "token", "value": "a236" }, {} ], [ { "__type": "token", "value": "a237" }, {} ], [ { "__type": "token", "value": "a238" }, {} ], [ { "__type": "token", "value": "a239" }, {} ], [ { "__type": "token", "value": "a240" }, {} ], [ { "__type": "token", "value": "a241" }, {} ], [ { "__type": "token", "value": "a242" }, {} ], [ { "__type": "token", "value": "a243" }, {} ], [ { "__type": "token", "value": "a244" }, {} ], [ { "__type": "token", "value": "a245" }, {} ], [ { "__type": "token", "value": "a246" }, {} ], [ { "__type": "token", "value": "a247" }, {} ], [ { "__type": "token", "value": "a248" }, {} ], [ { "__type": "token", "value": "a249" }, {} ], [ { "__type": "token", "value": "a250" }, {} ], [ { "__type": "token", "value": "a251" }, {} ], [ { "__type": "token", "value": "a252" }, {} ], [ { "__type": "token", "value": "a253" }, {} ], [ { "__type": "token", "value": "a254" }, {} ], [ { "__type": "token", "value": "a255" }, {} ], [ { "__type": "token", "value": "a256" }, {} ], [ { "__type": "token", "value": "a257" }, {} ], [ { "__type": "token", "value": "a258" }, {} ], [ { "__type": "token", "value": "a259" }, {} ], [ { "__type": "token", "value": "a260" }, {} ], [ { "__type": "token", "value": "a261" }, {} ], [ { "__type": "token", "value": "a262" }, {} ], [ { "__type": "token", "value": "a263" }, {} ], [ { "__type": "token", "value": "a264" }, {} ], [ { "__type": "token", "value": "a265" }, {} ], [ { "__type": "token", "value": "a266" }, {} ], [ { "__type": "token", "value": "a267" }, {} ], [ { "__type": "token", "value": "a268" }, {} ], [ { "__type": "token", "value": "a269" }, {} ], [ { "__type": "token", "value": "a270" }, {} ], [ { "__type": "token", "value": "a271" }, {} ], [ { "__type": "token", "value": "a272" }, {} ], [ { "__type": "token", "value": "a273" }, {} ], [ { "__type": "token", "value": "a274" }, {} ], [ { "__type": "token", "value": "a275" }, {} ], [ { "__type": "token", "value": "a276" }, {} ], [ { "__type": "token", "value": "a277" }, {} ], [ { "__type": "token", "value": "a278" }, {} ], [ { "__type": "token", "value": "a279" }, {} ], [ { "__type": "token", "value": "a280" }, {} ], [ { "__type": "token", "value": "a281" }, {} ], [ { "__type": "token", "value": "a282" }, {} ], [ { "__type": "token", "value": "a283" }, {} ], [ { "__type": "token", "value": "a284" }, {} ], [ { "__type": "token", "value": "a285" }, {} ], [ { "__type": "token", "value": "a286" }, {} ], [ { "__type": "token", "value": "a287" }, {} ], [ { "__type": "token", "value": "a288" }, {} ], [ { "__type": "token", "value": "a289" }, {} ], [ { "__type": "token", "value": "a290" }, {} ], [ { "__type": "token", "value": "a291" }, {} ], [ { "__type": "token", "value": "a292" }, {} ], [ { "__type": "token", "value": "a293" }, {} ], [ { "__type": "token", "value": "a294" }, {} ], [ { "__type": "token", "value": "a295" }, {} ], [ { "__type": "token", "value": "a296" }, {} ], [ { "__type": "token", "value": "a297" }, {} ], [ { "__type": "token", "value": "a298" }, {} ], [ { "__type": "token", "value": "a299" }, {} ], [ { "__type": "token", "value": "a300" }, {} ], [ { "__type": "token", "value": "a301" }, {} ], [ { "__type": "token", "value": "a302" }, {} ], [ { "__type": "token", "value": "a303" }, {} ], [ { "__type": "token", "value": "a304" }, {} ], [ { "__type": "token", "value": "a305" }, {} ], [ { "__type": "token", "value": "a306" }, {} ], [ { "__type": "token", "value": "a307" }, {} ], [ { "__type": "token", "value": "a308" }, {} ], [ { "__type": "token", "value": "a309" }, {} ], [ { "__type": "token", "value": "a310" }, {} ], [ { "__type": "token", "value": "a311" }, {} ], [ { "__type": "token", "value": "a312" }, {} ], [ { "__type": "token", "value": "a313" }, {} ], [ { "__type": "token", "value": "a314" }, {} ], [ { "__type": "token", "value": "a315" }, {} ], [ { "__type": "token", "value": "a316" }, {} ], [ { "__type": "token", "value": "a317" }, {} ], [ { "__type": "token", "value": "a318" }, {} ], [ { "__type": "token", "value": "a319" }, {} ], [ { "__type": "token", "value": "a320" }, {} ], [ { "__type": "token", "value": "a321" }, {} ], [ { "__type": "token", "value": "a322" }, {} ], [ { "__type": "token", "value": "a323" }, {} ], [ { "__type": "token", "value": "a324" }, {} ], [ { "__type": "token", "value": "a325" }, {} ], [ { "__type": "token", "value": "a326" }, {} ], [ { "__type": "token", "value": "a327" }, {} ], [ { "__type": "token", "value": "a328" }, {} ], [ { "__type": "token", "value": "a329" }, {} ], [ { "__type": "token", "value": "a330" }, {} ], [ { "__type": "token", "value": "a331" }, {} ], [ { "__type": "token", "value": "a332" }, {} ], [ { "__type": "token", "value": "a333" }, {} ], [ { "__type": "token", "value": "a334" }, {} ], [ { "__type": "token", "value": "a335" }, {} ], [ { "__type": "token", "value": "a336" }, {} ], [ { "__type": "token", "value": "a337" }, {} ], [ { "__type": "token", "value": "a338" }, {} ], [ { "__type": "token", "value": "a339" }, {} ], [ { "__type": "token", "value": "a340" }, {} ], [ { "__type": "token", "value": "a341" }, {} ], [ { "__type": "token", "value": "a342" }, {} ], [ { "__type": "token", "value": "a343" }, {} ], [ { "__type": "token", "value": "a344" }, {} ], [ { "__type": "token", "value": "a345" }, {} ], [ { "__type": "token", "value": "a346" }, {} ], [ { "__type": "token", "value": "a347" }, {} ], [ { "__type": "token", "value": "a348" }, {} ], [ { "__type": "token", "value": "a349" }, {} ], [ { "__type": "token", "value": "a350" }, {} ], [ { "__type": "token", "value": "a351" }, {} ], [ { "__type": "token", "value": "a352" }, {} ], [ { "__type": "token", "value": "a353" }, {} ], [ { "__type": "token", "value": "a354" }, {} ], [ { "__type": "token", "value": "a355" }, {} ], [ { "__type": "token", "value": "a356" }, {} ], [ { "__type": "token", "value": "a357" }, {} ], [ { "__type": "token", "value": "a358" }, {} ], [ { "__type": "token", "value": "a359" }, {} ], [ { "__type": "token", "value": "a360" }, {} ], [ { "__type": "token", "value": "a361" }, {} ], [ { "__type": "token", "value": "a362" }, {} ], [ { "__type": "token", "value": "a363" }, {} ], [ { "__type": "token", "value": "a364" }, {} ], [ { "__type": "token", "value": "a365" }, {} ], [ { "__type": "token", "value": "a366" }, {} ], [ { "__type": "token", "value": "a367" }, {} ], [ { "__type": "token", "value": "a368" }, {} ], [ { "__type": "token", "value": "a369" }, {} ], [ { "__type": "token", "value": "a370" }, {} ], [ { "__type": "token", "value": "a371" }, {} ], [ { "__type": "token", "value": "a372" }, {} ], [ { "__type": "token", "value": "a373" }, {} ], [ { "__type": "token", "value": "a374" }, {} ], [ { "__type": "token", "value": "a375" }, {} ], [ { "__type": "token", "value": "a376" }, {} ], [ { "__type": "token", "value": "a377" }, {} ], [ { "__type": "token", "value": "a378" }, {} ], [ { "__type": "token", "value": "a379" }, {} ], [ { "__type": "token", "value": "a380" }, {} ], [ { "__type": "token", "value": "a381" }, {} ], [ { "__type": "token", "value": "a382" }, {} ], [ { "__type": "token", "value": "a383" }, {} ], [ { "__type": "token", "value": "a384" }, {} ], [ { "__type": "token", "value": "a385" }, {} ], [ { "__type": "token", "value": "a386" }, {} ], [ { "__type": "token", "value": "a387" }, {} ], [ { "__type": "token", "value": "a388" }, {} ], [ { "__type": "token", "value": "a389" }, {} ], [ { "__type": "token", "value": "a390" }, {} ], [ { "__type": "token", "value": "a391" }, {} ], [ { "__type": "token", "value": "a392" }, {} ], [ { "__type": "token", "value": "a393" }, {} ], [ { "__type": "token", "value": "a394" }, {} ], [ { "__type": "token", "value": "a395" }, {} ], [ { "__type": "token", "value": "a396" }, {} ], [ { "__type": "token", "value": "a397" }, {} ], [ { "__type": "token", "value": "a398" }, {} ], [ { "__type": "token", "value": "a399" }, {} ], [ { "__type": "token", "value": "a400" }, {} ], [ { "__type": "token", "value": "a401" }, {} ], [ { "__type": "token", "value": "a402" }, {} ], [ { "__type": "token", "value": "a403" }, {} ], [ { "__type": "token", "value": "a404" }, {} ], [ { "__type": "token", "value": "a405" }, {} ], [ { "__type": "token", "value": "a406" }, {} ], [ { "__type": "token", "value": "a407" }, {} ], [ { "__type": "token", "value": "a408" }, {} ], [ { "__type": "token", "value": "a409" }, {} ], [ { "__type": "token", "value": "a410" }, {} ], [ { "__type": "token", "value": "a411" }, {} ], [ { "__type": "token", "value": "a412" }, {} ], [ { "__type": "token", "value": "a413" }, {} ], [ { "__type": "token", "value": "a414" }, {} ], [ { "__type": "token", "value": "a415" }, {} ], [ { "__type": "token", "value": "a416" }, {} ], [ { "__type": "token", "value": "a417" }, {} ], [ { "__type": "token", "value": "a418" }, {} ], [ { "__type": "token", "value": "a419" }, {} ], [ { "__type": "token", "value": "a420" }, {} ], [ { "__type": "token", "value": "a421" }, {} ], [ { "__type": "token", "value": "a422" }, {} ], [ { "__type": "token", "value": "a423" }, {} ], [ { "__type": "token", "value": "a424" }, {} ], [ { "__type": "token", "value": "a425" }, {} ], [ { "__type": "token", "value": "a426" }, {} ], [ { "__type": "token", "value": "a427" }, {} ], [ { "__type": "token", "value": "a428" }, {} ], [ { "__type": "token", "value": "a429" }, {} ], [ { "__type": "token", "value": "a430" }, {} ], [ { "__type": "token", "value": "a431" }, {} ], [ { "__type": "token", "value": "a432" }, {} ], [ { "__type": "token", "value": "a433" }, {} ], [ { "__type": "token", "value": "a434" }, {} ], [ { "__type": "token", "value": "a435" }, {} ], [ { "__type": "token", "value": "a436" }, {} ], [ { "__type": "token", "value": "a437" }, {} ], [ { "__type": "token", "value": "a438" }, {} ], [ { "__type": "token", "value": "a439" }, {} ], [ { "__type": "token", "value": "a440" }, {} ], [ { "__type": "token", "value": "a441" }, {} ], [ { "__type": "token", "value": "a442" }, {} ], [ { "__type": "token", "value": "a443" }, {} ], [ { "__type": "token", "value": "a444" }, {} ], [ { "__type": "token", "value": "a445" }, {} ], [ { "__type": "token", "value": "a446" }, {} ], [ { "__type": "token", "value": "a447" }, {} ], [ { "__type": "token", "value": "a448" }, {} ], [ { "__type": "token", "value": "a449" }, {} ], [ { "__type": "token", "value": "a450" }, {} ], [ { "__type": "token", "value": "a451" }, {} ], [ { "__type": "token", "value": "a452" }, {} ], [ { "__type": "token", "value": "a453" }, {} ], [ { "__type": "token", "value": "a454" }, {} ], [ { "__type": "token", "value": "a455" }, {} ], [ { "__type": "token", "value": "a456" }, {} ], [ { "__type": "token", "value": "a457" }, {} ], [ { "__type": "token", "value": "a458" }, {} ], [ { "__type": "token", "value": "a459" }, {} ], [ { "__type": "token", "value": "a460" }, {} ], [ { "__type": "token", "value": "a461" }, {} ], [ { "__type": "token", "value": "a462" }, {} ], [ { "__type": "token", "value": "a463" }, {} ], [ { "__type": "token", "value": "a464" }, {} ], [ { "__type": "token", "value": "a465" }, {} ], [ { "__type": "token", "value": "a466" }, {} ], [ { "__type": "token", "value": "a467" }, {} ], [ { "__type": "token", "value": "a468" }, {} ], [ { "__type": "token", "value": "a469" }, {} ], [ { "__type": "token", "value": "a470" }, {} ], [ { "__type": "token", "value": "a471" }, {} ], [ { "__type": "token", "value": "a472" }, {} ], [ { "__type": "token", "value": "a473" }, {} ], [ { "__type": "token", "value": "a474" }, {} ], [ { "__type": "token", "value": "a475" }, {} ], [ { "__type": "token", "value": "a476" }, {} ], [ { "__type": "token", "value": "a477" }, {} ], [ { "__type": "token", "value": "a478" }, {} ], [ { "__type": "token", "value": "a479" }, {} ], [ { "__type": "token", "value": "a480" }, {} ], [ { "__type": "token", "value": "a481" }, {} ], [ { "__type": "token", "value": "a482" }, {} ], [ { "__type": "token", "value": "a483" }, {} ], [ { "__type": "token", "value": "a484" }, {} ], [ { "__type": "token", "value": "a485" }, {} ], [ { "__type": "token", "value": "a486" }, {} ], [ { "__type": "token", "value": "a487" }, {} ], [ { "__type": "token", "value": "a488" }, {} ], [ { "__type": "token", "value": "a489" }, {} ], [ { "__type": "token", "value": "a490" }, {} ], [ { "__type": "token", "value": "a491" }, {} ], [ { "__type": "token", "value": "a492" }, {} ], [ { "__type": "token", "value": "a493" }, {} ], [ { "__type": "token", "value": "a494" }, {} ], [ { "__type": "token", "value": "a495" }, {} ], [ { "__type": "token", "value": "a496" }, {} ], [ { "__type": "token", "value": "a497" }, {} ], [ { "__type": "token", "value": "a498" }, {} ], [ { "__type": "token", "value": "a499" }, {} ], [ { "__type": "token", "value": "a500" }, {} ], [ { "__type": "token", "value": "a501" }, {} ], [ { "__type": "token", "value": "a502" }, {} ], [ { "__type": "token", "value": "a503" }, {} ], [ { "__type": "token", "value": "a504" }, {} ], [ { "__type": "token", "value": "a505" }, {} ], [ { "__type": "token", "value": "a506" }, {} ], [ { "__type": "token", "value": "a507" }, {} ], [ { "__type": "token", "value": "a508" }, {} ], [ { "__type": "token", "value": "a509" }, {} ], [ { "__type": "token", "value": "a510" }, {} ], [ { "__type": "token", "value": "a511" }, {} ], [ { "__type": "token", "value": "a512" }, {} ], [ { "__type": "token", "value": "a513" }, {} ], [ { "__type": "token", "value": "a514" }, {} ], [ { "__type": "token", "value": "a515" }, {} ], [ { "__type": "token", "value": "a516" }, {} ], [ { "__type": "token", "value": "a517" }, {} ], [ { "__type": "token", "value": "a518" }, {} ], [ { "__type": "token", "value": "a519" }, {} ], [ { "__type": "token", "value": "a520" }, {} ], [ { "__type": "token", "value": "a521" }, {} ], [ { "__type": "token", "value": "a522" }, {} ], [ { "__type": "token", "value": "a523" }, {} ], [ { "__type": "token", "value": "a524" }, {} ], [ { "__type": "token", "value": "a525" }, {} ], [ { "__type": "token", "value": "a526" }, {} ], [ { "__type": "token", "value": "a527" }, {} ], [ { "__type": "token", "value": "a528" }, {} ], [ { "__type": "token", "value": "a529" }, {} ], [ { "__type": "token", "value": "a530" }, {} ], [ { "__type": "token", "value": "a531" }, {} ], [ { "__type": "token", "value": "a532" }, {} ], [ { "__type": "token", "value": "a533" }, {} ], [ { "__type": "token", "value": "a534" }, {} ], [ { "__type": "token", "value": "a535" }, {} ], [ { "__type": "token", "value": "a536" }, {} ], [ { "__type": "token", "value": "a537" }, {} ], [ { "__type": "token", "value": "a538" }, {} ], [ { "__type": "token", "value": "a539" }, {} ], [ { "__type": "token", "value": "a540" }, {} ], [ { "__type": "token", "value": "a541" }, {} ], [ { "__type": "token", "value": "a542" }, {} ], [ { "__type": "token", "value": "a543" }, {} ], [ { "__type": "token", "value": "a544" }, {} ], [ { "__type": "token", "value": "a545" }, {} ], [ { "__type": "token", "value": "a546" }, {} ], [ { "__type": "token", "value": "a547" }, {} ], [ { "__type": "token", "value": "a548" }, {} ], [ { "__type": "token", "value": "a549" }, {} ], [ { "__type": "token", "value": "a550" }, {} ], [ { "__type": "token", "value": "a551" }, {} ], [ { "__type": "token", "value": "a552" }, {} ], [ { "__type": "token", "value": "a553" }, {} ], [ { "__type": "token", "value": "a554" }, {} ], [ { "__type": "token", "value": "a555" }, {} ], [ { "__type": "token", "value": "a556" }, {} ], [ { "__type": "token", "value": "a557" }, {} ], [ { "__type": "token", "value": "a558" }, {} ], [ { "__type": "token", "value": "a559" }, {} ], [ { "__type": "token", "value": "a560" }, {} ], [ { "__type": "token", "value": "a561" }, {} ], [ { "__type": "token", "value": "a562" }, {} ], [ { "__type": "token", "value": "a563" }, {} ], [ { "__type": "token", "value": "a564" }, {} ], [ { "__type": "token", "value": "a565" }, {} ], [ { "__type": "token", "value": "a566" }, {} ], [ { "__type": "token", "value": "a567" }, {} ], [ { "__type": "token", "value": "a568" }, {} ], [ { "__type": "token", "value": "a569" }, {} ], [ { "__type": "token", "value": "a570" }, {} ], [ { "__type": "token", "value": "a571" }, {} ], [ { "__type": "token", "value": "a572" }, {} ], [ { "__type": "token", "value": "a573" }, {} ], [ { "__type": "token", "value": "a574" }, {} ], [ { "__type": "token", "value": "a575" }, {} ], [ { "__type": "token", "value": "a576" }, {} ], [ { "__type": "token", "value": "a577" }, {} ], [ { "__type": "token", "value": "a578" }, {} ], [ { "__type": "token", "value": "a579" }, {} ], [ { "__type": "token", "value": "a580" }, {} ], [ { "__type": "token", "value": "a581" }, {} ], [ { "__type": "token", "value": "a582" }, {} ], [ { "__type": "token", "value": "a583" }, {} ], [ { "__type": "token", "value": "a584" }, {} ], [ { "__type": "token", "value": "a585" }, {} ], [ { "__type": "token", "value": "a586" }, {} ], [ { "__type": "token", "value": "a587" }, {} ], [ { "__type": "token", "value": "a588" }, {} ], [ { "__type": "token", "value": "a589" }, {} ], [ { "__type": "token", "value": "a590" }, {} ], [ { "__type": "token", "value": "a591" }, {} ], [ { "__type": "token", "value": "a592" }, {} ], [ { "__type": "token", "value": "a593" }, {} ], [ { "__type": "token", "value": "a594" }, {} ], [ { "__type": "token", "value": "a595" }, {} ], [ { "__type": "token", "value": "a596" }, {} ], [ { "__type": "token", "value": "a597" }, {} ], [ { "__type": "token", "value": "a598" }, {} ], [ { "__type": "token", "value": "a599" }, {} ], [ { "__type": "token", "value": "a600" }, {} ], [ { "__type": "token", "value": "a601" }, {} ], [ { "__type": "token", "value": "a602" }, {} ], [ { "__type": "token", "value": "a603" }, {} ], [ { "__type": "token", "value": "a604" }, {} ], [ { "__type": "token", "value": "a605" }, {} ], [ { "__type": "token", "value": "a606" }, {} ], [ { "__type": "token", "value": "a607" }, {} ], [ { "__type": "token", "value": "a608" }, {} ], [ { "__type": "token", "value": "a609" }, {} ], [ { "__type": "token", "value": "a610" }, {} ], [ { "__type": "token", "value": "a611" }, {} ], [ { "__type": "token", "value": "a612" }, {} ], [ { "__type": "token", "value": "a613" }, {} ], [ { "__type": "token", "value": "a614" }, {} ], [ { "__type": "token", "value": "a615" }, {} ], [ { "__type": "token", "value": "a616" }, {} ], [ { "__type": "token", "value": "a617" }, {} ], [ { "__type": "token", "value": "a618" }, {} ], [ { "__type": "token", "value": "a619" }, {} ], [ { "__type": "token", "value": "a620" }, {} ], [ { "__type": "token", "value": "a621" }, {} ], [ { "__type": "token", "value": "a622" }, {} ], [ { "__type": "token", "value": "a623" }, {} ], [ { "__type": "token", "value": "a624" }, {} ], [ { "__type": "token", "value": "a625" }, {} ], [ { "__type": "token", "value": "a626" }, {} ], [ { "__type": "token", "value": "a627" }, {} ], [ { "__type": "token", "value": "a628" }, {} ], [ { "__type": "token", "value": "a629" }, {} ], [ { "__type": "token", "value": "a630" }, {} ], [ { "__type": "token", "value": "a631" }, {} ], [ { "__type": "token", "value": "a632" }, {} ], [ { "__type": "token", "value": "a633" }, {} ], [ { "__type": "token", "value": "a634" }, {} ], [ { "__type": "token", "value": "a635" }, {} ], [ { "__type": "token", "value": "a636" }, {} ], [ { "__type": "token", "value": "a637" }, {} ], [ { "__type": "token", "value": "a638" }, {} ], [ { "__type": "token", "value": "a639" }, {} ], [ { "__type": "token", "value": "a640" }, {} ], [ { "__type": "token", "value": "a641" }, {} ], [ { "__type": "token", "value": "a642" }, {} ], [ { "__type": "token", "value": "a643" }, {} ], [ { "__type": "token", "value": "a644" }, {} ], [ { "__type": "token", "value": "a645" }, {} ], [ { "__type": "token", "value": "a646" }, {} ], [ { "__type": "token", "value": "a647" }, {} ], [ { "__type": "token", "value": "a648" }, {} ], [ { "__type": "token", "value": "a649" }, {} ], [ { "__type": "token", "value": "a650" }, {} ], [ { "__type": "token", "value": "a651" }, {} ], [ { "__type": "token", "value": "a652" }, {} ], [ { "__type": "token", "value": "a653" }, {} ], [ { "__type": "token", "value": "a654" }, {} ], [ { "__type": "token", "value": "a655" }, {} ], [ { "__type": "token", "value": "a656" }, {} ], [ { "__type": "token", "value": "a657" }, {} ], [ { "__type": "token", "value": "a658" }, {} ], [ { "__type": "token", "value": "a659" }, {} ], [ { "__type": "token", "value": "a660" }, {} ], [ { "__type": "token", "value": "a661" }, {} ], [ { "__type": "token", "value": "a662" }, {} ], [ { "__type": "token", "value": "a663" }, {} ], [ { "__type": "token", "value": "a664" }, {} ], [ { "__type": "token", "value": "a665" }, {} ], [ { "__type": "token", "value": "a666" }, {} ], [ { "__type": "token", "value": "a667" }, {} ], [ { "__type": "token", "value": "a668" }, {} ], [ { "__type": "token", "value": "a669" }, {} ], [ { "__type": "token", "value": "a670" }, {} ], [ { "__type": "token", "value": "a671" }, {} ], [ { "__type": "token", "value": "a672" }, {} ], [ { "__type": "token", "value": "a673" }, {} ], [ { "__type": "token", "value": "a674" }, {} ], [ { "__type": "token", "value": "a675" }, {} ], [ { "__type": "token", "value": "a676" }, {} ], [ { "__type": "token", "value": "a677" }, {} ], [ { "__type": "token", "value": "a678" }, {} ], [ { "__type": "token", "value": "a679" }, {} ], [ { "__type": "token", "value": "a680" }, {} ], [ { "__type": "token", "value": "a681" }, {} ], [ { "__type": "token", "value": "a682" }, {} ], [ { "__type": "token", "value": "a683" }, {} ], [ { "__type": "token", "value": "a684" }, {} ], [ { "__type": "token", "value": "a685" }, {} ], [ { "__type": "token", "value": "a686" }, {} ], [ { "__type": "token", "value": "a687" }, {} ], [ { "__type": "token", "value": "a688" }, {} ], [ { "__type": "token", "value": "a689" }, {} ], [ { "__type": "token", "value": "a690" }, {} ], [ { "__type": "token", "value": "a691" }, {} ], [ { "__type": "token", "value": "a692" }, {} ], [ { "__type": "token", "value": "a693" }, {} ], [ { "__type": "token", "value": "a694" }, {} ], [ { "__type": "token", "value": "a695" }, {} ], [ { "__type": "token", "value": "a696" }, {} ], [ { "__type": "token", "value": "a697" }, {} ], [ { "__type": "token", "value": "a698" }, {} ], [ { "__type": "token", "value": "a699" }, {} ], [ { "__type": "token", "value": "a700" }, {} ], [ { "__type": "token", "value": "a701" }, {} ], [ { "__type": "token", "value": "a702" }, {} ], [ { "__type": "token", "value": "a703" }, {} ], [ { "__type": "token", "value": "a704" }, {} ], [ { "__type": "token", "value": "a705" }, {} ], [ { "__type": "token", "value": "a706" }, {} ], [ { "__type": "token", "value": "a707" }, {} ], [ { "__type": "token", "value": "a708" }, {} ], [ { "__type": "token", "value": "a709" }, {} ], [ { "__type": "token", "value": "a710" }, {} ], [ { "__type": "token", "value": "a711" }, {} ], [ { "__type": "token", "value": "a712" }, {} ], [ { "__type": "token", "value": "a713" }, {} ], [ { "__type": "token", "value": "a714" }, {} ], [ { "__type": "token", "value": "a715" }, {} ], [ { "__type": "token", "value": "a716" }, {} ], [ { "__type": "token", "value": "a717" }, {} ], [ { "__type": "token", "value": "a718" }, {} ], [ { "__type": "token", "value": "a719" }, {} ], [ { "__type": "token", "value": "a720" }, {} ], [ { "__type": "token", "value": "a721" }, {} ], [ { "__type": "token", "value": "a722" }, {} ], [ { "__type": "token", "value": "a723" }, {} ], [ { "__type": "token", "value": "a724" }, {} ], [ { "__type": "token", "value": "a725" }, {} ], [ { "__type": "token", "value": "a726" }, {} ], [ { "__type": "token", "value": "a727" }, {} ], [ { "__type": "token", "value": "a728" }, {} ], [ { "__type": "token", "value": "a729" }, {} ], [ { "__type": "token", "value": "a730" }, {} ], [ { "__type": "token", "value": "a731" }, {} ], [ { "__type": "token", "value": "a732" }, {} ], [ { "__type": "token", "value": "a733" }, {} ], [ { "__type": "token", "value": "a734" }, {} ], [ { "__type": "token", "value": "a735" }, {} ], [ { "__type": "token", "value": "a736" }, {} ], [ { "__type": "token", "value": "a737" }, {} ], [ { "__type": "token", "value": "a738" }, {} ], [ { "__type": "token", "value": "a739" }, {} ], [ { "__type": "token", "value": "a740" }, {} ], [ { "__type": "token", "value": "a741" }, {} ], [ { "__type": "token", "value": "a742" }, {} ], [ { "__type": "token", "value": "a743" }, {} ], [ { "__type": "token", "value": "a744" }, {} ], [ { "__type": "token", "value": "a745" }, {} ], [ { "__type": "token", "value": "a746" }, {} ], [ { "__type": "token", "value": "a747" }, {} ], [ { "__type": "token", "value": "a748" }, {} ], [ { "__type": "token", "value": "a749" }, {} ], [ { "__type": "token", "value": "a750" }, {} ], [ { "__type": "token", "value": "a751" }, {} ], [ { "__type": "token", "value": "a752" }, {} ], [ { "__type": "token", "value": "a753" }, {} ], [ { "__type": "token", "value": "a754" }, {} ], [ { "__type": "token", "value": "a755" }, {} ], [ { "__type": "token", "value": "a756" }, {} ], [ { "__type": "token", "value": "a757" }, {} ], [ { "__type": "token", "value": "a758" }, {} ], [ { "__type": "token", "value": "a759" }, {} ], [ { "__type": "token", "value": "a760" }, {} ], [ { "__type": "token", "value": "a761" }, {} ], [ { "__type": "token", "value": "a762" }, {} ], [ { "__type": "token", "value": "a763" }, {} ], [ { "__type": "token", "value": "a764" }, {} ], [ { "__type": "token", "value": "a765" }, {} ], [ { "__type": "token", "value": "a766" }, {} ], [ { "__type": "token", "value": "a767" }, {} ], [ { "__type": "token", "value": "a768" }, {} ], [ { "__type": "token", "value": "a769" }, {} ], [ { "__type": "token", "value": "a770" }, {} ], [ { "__type": "token", "value": "a771" }, {} ], [ { "__type": "token", "value": "a772" }, {} ], [ { "__type": "token", "value": "a773" }, {} ], [ { "__type": "token", "value": "a774" }, {} ], [ { "__type": "token", "value": "a775" }, {} ], [ { "__type": "token", "value": "a776" }, {} ], [ { "__type": "token", "value": "a777" }, {} ], [ { "__type": "token", "value": "a778" }, {} ], [ { "__type": "token", "value": "a779" }, {} ], [ { "__type": "token", "value": "a780" }, {} ], [ { "__type": "token", "value": "a781" }, {} ], [ { "__type": "token", "value": "a782" }, {} ], [ { "__type": "token", "value": "a783" }, {} ], [ { "__type": "token", "value": "a784" }, {} ], [ { "__type": "token", "value": "a785" }, {} ], [ { "__type": "token", "value": "a786" }, {} ], [ { "__type": "token", "value": "a787" }, {} ], [ { "__type": "token", "value": "a788" }, {} ], [ { "__type": "token", "value": "a789" }, {} ], [ { "__type": "token", "value": "a790" }, {} ], [ { "__type": "token", "value": "a791" }, {} ], [ { "__type": "token", "value": "a792" }, {} ], [ { "__type": "token", "value": "a793" }, {} ], [ { "__type": "token", "value": "a794" }, {} ], [ { "__type": "token", "value": "a795" }, {} ], [ { "__type": "token", "value": "a796" }, {} ], [ { "__type": "token", "value": "a797" }, {} ], [ { "__type": "token", "value": "a798" }, {} ], [ { "__type": "token", "value": "a799" }, {} ], [ { "__type": "token", "value": "a800" }, {} ], [ { "__type": "token", "value": "a801" }, {} ], [ { "__type": "token", "value": "a802" }, {} ], [ { "__type": "token", "value": "a803" }, {} ], [ { "__type": "token", "value": "a804" }, {} ], [ { "__type": "token", "value": "a805" }, {} ], [ { "__type": "token", "value": "a806" }, {} ], [ { "__type": "token", "value": "a807" }, {} ], [ { "__type": "token", "value": "a808" }, {} ], [ { "__type": "token", "value": "a809" }, {} ], [ { "__type": "token", "value": "a810" }, {} ], [ { "__type": "token", "value": "a811" }, {} ], [ { "__type": "token", "value": "a812" }, {} ], [ { "__type": "token", "value": "a813" }, {} ], [ { "__type": "token", "value": "a814" }, {} ], [ { "__type": "token", "value": "a815" }, {} ], [ { "__type": "token", "value": "a816" }, {} ], [ { "__type": "token", "value": "a817" }, {} ], [ { "__type": "token", "value": "a818" }, {} ], [ { "__type": "token", "value": "a819" }, {} ], [ { "__type": "token", "value": "a820" }, {} ], [ { "__type": "token", "value": "a821" }, {} ], [ { "__type": "token", "value": "a822" }, {} ], [ { "__type": "token", "value": "a823" }, {} ], [ { "__type": "token", "value": "a824" }, {} ], [ { "__type": "token", "value": "a825" }, {} ], [ { "__type": "token", "value": "a826" }, {} ], [ { "__type": "token", "value": "a827" }, {} ], [ { "__type": "token", "value": "a828" }, {} ], [ { "__type": "token", "value": "a829" }, {} ], [ { "__type": "token", "value": "a830" }, {} ], [ { "__type": "token", "value": "a831" }, {} ], [ { "__type": "token", "value": "a832" }, {} ], [ { "__type": "token", "value": "a833" }, {} ], [ { "__type": "token", "value": "a834" }, {} ], [ { "__type": "token", "value": "a835" }, {} ], [ { "__type": "token", "value": "a836" }, {} ], [ { "__type": "token", "value": "a837" }, {} ], [ { "__type": "token", "value": "a838" }, {} ], [ { "__type": "token", "value": "a839" }, {} ], [ { "__type": "token", "value": "a840" }, {} ], [ { "__type": "token", "value": "a841" }, {} ], [ { "__type": "token", "value": "a842" }, {} ], [ { "__type": "token", "value": "a843" }, {} ], [ { "__type": "token", "value": "a844" }, {} ], [ { "__type": "token", "value": "a845" }, {} ], [ { "__type": "token", "value": "a846" }, {} ], [ { "__type": "token", "value": "a847" }, {} ], [ { "__type": "token", "value": "a848" }, {} ], [ { "__type": "token", "value": "a849" }, {} ], [ { "__type": "token", "value": "a850" }, {} ], [ { "__type": "token", "value": "a851" }, {} ], [ { "__type": "token", "value": "a852" }, {} ], [ { "__type": "token", "value": "a853" }, {} ], [ { "__type": "token", "value": "a854" }, {} ], [ { "__type": "token", "value": "a855" }, {} ], [ { "__type": "token", "value": "a856" }, {} ], [ { "__type": "token", "value": "a857" }, {} ], [ { "__type": "token", "value": "a858" }, {} ], [ { "__type": "token", "value": "a859" }, {} ], [ { "__type": "token", "value": "a860" }, {} ], [ { "__type": "token", "value": "a861" }, {} ], [ { "__type": "token", "value": "a862" }, {} ], [ { "__type": "token", "value": "a863" }, {} ], [ { "__type": "token", "value": "a864" }, {} ], [ { "__type": "token", "value": "a865" }, {} ], [ { "__type": "token", "value": "a866" }, {} ], [ { "__type": "token", "value": "a867" }, {} ], [ { "__type": "token", "value": "a868" }, {} ], [ { "__type": "token", "value": "a869" }, {} ], [ { "__type": "token", "value": "a870" }, {} ], [ { "__type": "token", "value": "a871" }, {} ], [ { "__type": "token", "value": "a872" }, {} ], [ { "__type": "token", "value": "a873" }, {} ], [ { "__type": "token", "value": "a874" }, {} ], [ { "__type": "token", "value": "a875" }, {} ], [ { "__type": "token", "value": "a876" }, {} ], [ { "__type": "token", "value": "a877" }, {} ], [ { "__type": "token", "value": "a878" }, {} ], [ { "__type": "token", "value": "a879" }, {} ], [ { "__type": "token", "value": "a880" }, {} ], [ { "__type": "token", "value": "a881" }, {} ], [ { "__type": "token", "value": "a882" }, {} ], [ { "__type": "token", "value": "a883" }, {} ], [ { "__type": "token", "value": "a884" }, {} ], [ { "__type": "token", "value": "a885" }, {} ], [ { "__type": "token", "value": "a886" }, {} ], [ { "__type": "token", "value": "a887" }, {} ], [ { "__type": "token", "value": "a888" }, {} ], [ { "__type": "token", "value": "a889" }, {} ], [ { "__type": "token", "value": "a890" }, {} ], [ { "__type": "token", "value": "a891" }, {} ], [ { "__type": "token", "value": "a892" }, {} ], [ { "__type": "token", "value": "a893" }, {} ], [ { "__type": "token", "value": "a894" }, {} ], [ { "__type": "token", "value": "a895" }, {} ], [ { "__type": "token", "value": "a896" }, {} ], [ { "__type": "token", "value": "a897" }, {} ], [ { "__type": "token", "value": "a898" }, {} ], [ { "__type": "token", "value": "a899" }, {} ], [ { "__type": "token", "value": "a900" }, {} ], [ { "__type": "token", "value": "a901" }, {} ], [ { "__type": "token", "value": "a902" }, {} ], [ { "__type": "token", "value": "a903" }, {} ], [ { "__type": "token", "value": "a904" }, {} ], [ { "__type": "token", "value": "a905" }, {} ], [ { "__type": "token", "value": "a906" }, {} ], [ { "__type": "token", "value": "a907" }, {} ], [ { "__type": "token", "value": "a908" }, {} ], [ { "__type": "token", "value": "a909" }, {} ], [ { "__type": "token", "value": "a910" }, {} ], [ { "__type": "token", "value": "a911" }, {} ], [ { "__type": "token", "value": "a912" }, {} ], [ { "__type": "token", "value": "a913" }, {} ], [ { "__type": "token", "value": "a914" }, {} ], [ { "__type": "token", "value": "a915" }, {} ], [ { "__type": "token", "value": "a916" }, {} ], [ { "__type": "token", "value": "a917" }, {} ], [ { "__type": "token", "value": "a918" }, {} ], [ { "__type": "token", "value": "a919" }, {} ], [ { "__type": "token", "value": "a920" }, {} ], [ { "__type": "token", "value": "a921" }, {} ], [ { "__type": "token", "value": "a922" }, {} ], [ { "__type": "token", "value": "a923" }, {} ], [ { "__type": "token", "value": "a924" }, {} ], [ { "__type": "token", "value": "a925" }, {} ], [ { "__type": "token", "value": "a926" }, {} ], [ { "__type": "token", "value": "a927" }, {} ], [ { "__type": "token", "value": "a928" }, {} ], [ { "__type": "token", "value": "a929" }, {} ], [ { "__type": "token", "value": "a930" }, {} ], [ { "__type": "token", "value": "a931" }, {} ], [ { "__type": "token", "value": "a932" }, {} ], [ { "__type": "token", "value": "a933" }, {} ], [ { "__type": "token", "value": "a934" }, {} ], [ { "__type": "token", "value": "a935" }, {} ], [ { "__type": "token", "value": "a936" }, {} ], [ { "__type": "token", "value": "a937" }, {} ], [ { "__type": "token", "value": "a938" }, {} ], [ { "__type": "token", "value": "a939" }, {} ], [ { "__type": "token", "value": "a940" }, {} ], [ { "__type": "token", "value": "a941" }, {} ], [ { "__type": "token", "value": "a942" }, {} ], [ { "__type": "token", "value": "a943" }, {} ], [ { "__type": "token", "value": "a944" }, {} ], [ { "__type": "token", "value": "a945" }, {} ], [ { "__type": "token", "value": "a946" }, {} ], [ { "__type": "token", "value": "a947" }, {} ], [ { "__type": "token", "value": "a948" }, {} ], [ { "__type": "token", "value": "a949" }, {} ], [ { "__type": "token", "value": "a950" }, {} ], [ { "__type": "token", "value": "a951" }, {} ], [ { "__type": "token", "value": "a952" }, {} ], [ { "__type": "token", "value": "a953" }, {} ], [ { "__type": "token", "value": "a954" }, {} ], [ { "__type": "token", "value": "a955" }, {} ], [ { "__type": "token", "value": "a956" }, {} ], [ { "__type": "token", "value": "a957" }, {} ], [ { "__type": "token", "value": "a958" }, {} ], [ { "__type": "token", "value": "a959" }, {} ], [ { "__type": "token", "value": "a960" }, {} ], [ { "__type": "token", "value": "a961" }, {} ], [ { "__type": "token", "value": "a962" }, {} ], [ { "__type": "token", "value": "a963" }, {} ], [ { "__type": "token", "value": "a964" }, {} ], [ { "__type": "token", "value": "a965" }, {} ], [ { "__type": "token", "value": "a966" }, {} ], [ { "__type": "token", "value": "a967" }, {} ], [ { "__type": "token", "value": "a968" }, {} ], [ { "__type": "token", "value": "a969" }, {} ], [ { "__type": "token", "value": "a970" }, {} ], [ { "__type": "token", "value": "a971" }, {} ], [ { "__type": "token", "value": "a972" }, {} ], [ { "__type": "token", "value": "a973" }, {} ], [ { "__type": "token", "value": "a974" }, {} ], [ { "__type": "token", "value": "a975" }, {} ], [ { "__type": "token", "value": "a976" }, {} ], [ { "__type": "token", "value": "a977" }, {} ], [ { "__type": "token", "value": "a978" }, {} ], [ { "__type": "token", "value": "a979" }, {} ], [ { "__type": "token", "value": "a980" }, {} ], [ { "__type": "token", "value": "a981" }, {} ], [ { "__type": "token", "value": "a982" }, {} ], [ { "__type": "token", "value": "a983" }, {} ], [ { "__type": "token", "value": "a984" }, {} ], [ { "__type": "token", "value": "a985" }, {} ], [ { "__type": "token", "value": "a986" }, {} ], [ { "__type": "token", "value": "a987" }, {} ], [ { "__type": "token", "value": "a988" }, {} ], [ { "__type": "token", "value": "a989" }, {} ], [ { "__type": "token", "value": "a990" }, {} ], [ { "__type": "token", "value": "a991" }, {} ], [ { "__type": "token", "value": "a992" }, {} ], [ { "__type": "token", "value": "a993" }, {} ], [ { "__type": "token", "value": "a994" }, {} ], [ { "__type": "token", "value": "a995" }, {} ], [ { "__type": "token", "value": "a996" }, {} ], [ { "__type": "token", "value": "a997" }, {} ], [ { "__type": "token", "value": "a998" }, {} ], [ { "__type": "token", "value": "a999" }, {} ], [ { "__type": "token", "value": "a1000" }, {} ], [ { "__type": "token", "value": "a1001" }, {} ], [ { "__type": "token", "value": "a1002" }, {} ], [ { "__type": "token", "value": "a1003" }, {} ], [ { "__type": "token", "value": "a1004" }, {} ], [ { "__type": "token", "value": "a1005" }, {} ], [ { "__type": "token", "value": "a1006" }, {} ], [ { "__type": "token", "value": "a1007" }, {} ], [ { "__type": "token", "value": "a1008" }, {} ], [ { "__type": "token", "value": "a1009" }, {} ], [ { "__type": "token", "value": "a1010" }, {} ], [ { "__type": "token", "value": "a1011" }, {} ], [ { "__type": "token", "value": "a1012" }, {} ], [ { "__type": "token", "value": "a1013" }, {} ], [ { "__type": "token", "value": "a1014" }, {} ], [ { "__type": "token", "value": "a1015" }, {} ], [ { "__type": "token", "value": "a1016" }, {} ], [ { "__type": "token", "value": "a1017" }, {} ], [ { "__type": "token", "value": "a1018" }, {} ], [ { "__type": "token", "value": "a1019" }, {} ], [ { "__type": "token", "value": "a1020" }, {} ], [ { "__type": "token", "value": "a1021" }, {} ], [ { "__type": "token", "value": "a1022" }, {} ], [ { "__type": "token", "value": "a1023" }, {} ] ] }, { "name": "large parameterised list", "raw": [ "foo;a0=1, foo;a1=1, foo;a2=1, foo;a3=1, foo;a4=1, foo;a5=1, foo;a6=1, foo;a7=1, foo;a8=1, foo;a9=1, foo;a10=1, foo;a11=1, foo;a12=1, foo;a13=1, foo;a14=1, foo;a15=1, foo;a16=1, foo;a17=1, foo;a18=1, foo;a19=1, foo;a20=1, foo;a21=1, foo;a22=1, foo;a23=1, foo;a24=1, foo;a25=1, foo;a26=1, foo;a27=1, foo;a28=1, foo;a29=1, foo;a30=1, foo;a31=1, foo;a32=1, foo;a33=1, foo;a34=1, foo;a35=1, foo;a36=1, foo;a37=1, foo;a38=1, foo;a39=1, foo;a40=1, foo;a41=1, foo;a42=1, foo;a43=1, foo;a44=1, foo;a45=1, foo;a46=1, foo;a47=1, foo;a48=1, foo;a49=1, foo;a50=1, foo;a51=1, foo;a52=1, foo;a53=1, foo;a54=1, foo;a55=1, foo;a56=1, foo;a57=1, foo;a58=1, foo;a59=1, foo;a60=1, foo;a61=1, foo;a62=1, foo;a63=1, foo;a64=1, foo;a65=1, foo;a66=1, foo;a67=1, foo;a68=1, foo;a69=1, foo;a70=1, foo;a71=1, foo;a72=1, foo;a73=1, foo;a74=1, foo;a75=1, foo;a76=1, foo;a77=1, foo;a78=1, foo;a79=1, foo;a80=1, foo;a81=1, foo;a82=1, foo;a83=1, foo;a84=1, foo;a85=1, foo;a86=1, foo;a87=1, foo;a88=1, foo;a89=1, foo;a90=1, foo;a91=1, foo;a92=1, foo;a93=1, foo;a94=1, foo;a95=1, foo;a96=1, foo;a97=1, foo;a98=1, foo;a99=1, foo;a100=1, foo;a101=1, foo;a102=1, foo;a103=1, foo;a104=1, foo;a105=1, foo;a106=1, foo;a107=1, foo;a108=1, foo;a109=1, foo;a110=1, foo;a111=1, foo;a112=1, foo;a113=1, foo;a114=1, foo;a115=1, foo;a116=1, foo;a117=1, foo;a118=1, foo;a119=1, foo;a120=1, foo;a121=1, foo;a122=1, foo;a123=1, foo;a124=1, foo;a125=1, foo;a126=1, foo;a127=1, foo;a128=1, foo;a129=1, foo;a130=1, foo;a131=1, foo;a132=1, foo;a133=1, foo;a134=1, foo;a135=1, foo;a136=1, foo;a137=1, foo;a138=1, foo;a139=1, foo;a140=1, foo;a141=1, foo;a142=1, foo;a143=1, foo;a144=1, foo;a145=1, foo;a146=1, foo;a147=1, foo;a148=1, foo;a149=1, foo;a150=1, foo;a151=1, foo;a152=1, foo;a153=1, foo;a154=1, foo;a155=1, foo;a156=1, foo;a157=1, foo;a158=1, foo;a159=1, foo;a160=1, foo;a161=1, foo;a162=1, foo;a163=1, foo;a164=1, foo;a165=1, foo;a166=1, foo;a167=1, foo;a168=1, foo;a169=1, foo;a170=1, foo;a171=1, foo;a172=1, foo;a173=1, foo;a174=1, foo;a175=1, foo;a176=1, foo;a177=1, foo;a178=1, foo;a179=1, foo;a180=1, foo;a181=1, foo;a182=1, foo;a183=1, foo;a184=1, foo;a185=1, foo;a186=1, foo;a187=1, foo;a188=1, foo;a189=1, foo;a190=1, foo;a191=1, foo;a192=1, foo;a193=1, foo;a194=1, foo;a195=1, foo;a196=1, foo;a197=1, foo;a198=1, foo;a199=1, foo;a200=1, foo;a201=1, foo;a202=1, foo;a203=1, foo;a204=1, foo;a205=1, foo;a206=1, foo;a207=1, foo;a208=1, foo;a209=1, foo;a210=1, foo;a211=1, foo;a212=1, foo;a213=1, foo;a214=1, foo;a215=1, foo;a216=1, foo;a217=1, foo;a218=1, foo;a219=1, foo;a220=1, foo;a221=1, foo;a222=1, foo;a223=1, foo;a224=1, foo;a225=1, foo;a226=1, foo;a227=1, foo;a228=1, foo;a229=1, foo;a230=1, foo;a231=1, foo;a232=1, foo;a233=1, foo;a234=1, foo;a235=1, foo;a236=1, foo;a237=1, foo;a238=1, foo;a239=1, foo;a240=1, foo;a241=1, foo;a242=1, foo;a243=1, foo;a244=1, foo;a245=1, foo;a246=1, foo;a247=1, foo;a248=1, foo;a249=1, foo;a250=1, foo;a251=1, foo;a252=1, foo;a253=1, foo;a254=1, foo;a255=1, foo;a256=1, foo;a257=1, foo;a258=1, foo;a259=1, foo;a260=1, foo;a261=1, foo;a262=1, foo;a263=1, foo;a264=1, foo;a265=1, foo;a266=1, foo;a267=1, foo;a268=1, foo;a269=1, foo;a270=1, foo;a271=1, foo;a272=1, foo;a273=1, foo;a274=1, foo;a275=1, foo;a276=1, foo;a277=1, foo;a278=1, foo;a279=1, foo;a280=1, foo;a281=1, foo;a282=1, foo;a283=1, foo;a284=1, foo;a285=1, foo;a286=1, foo;a287=1, foo;a288=1, foo;a289=1, foo;a290=1, foo;a291=1, foo;a292=1, foo;a293=1, foo;a294=1, foo;a295=1, foo;a296=1, foo;a297=1, foo;a298=1, foo;a299=1, foo;a300=1, foo;a301=1, foo;a302=1, foo;a303=1, foo;a304=1, foo;a305=1, foo;a306=1, foo;a307=1, foo;a308=1, foo;a309=1, foo;a310=1, foo;a311=1, foo;a312=1, foo;a313=1, foo;a314=1, foo;a315=1, foo;a316=1, foo;a317=1, foo;a318=1, foo;a319=1, foo;a320=1, foo;a321=1, foo;a322=1, foo;a323=1, foo;a324=1, foo;a325=1, foo;a326=1, foo;a327=1, foo;a328=1, foo;a329=1, foo;a330=1, foo;a331=1, foo;a332=1, foo;a333=1, foo;a334=1, foo;a335=1, foo;a336=1, foo;a337=1, foo;a338=1, foo;a339=1, foo;a340=1, foo;a341=1, foo;a342=1, foo;a343=1, foo;a344=1, foo;a345=1, foo;a346=1, foo;a347=1, foo;a348=1, foo;a349=1, foo;a350=1, foo;a351=1, foo;a352=1, foo;a353=1, foo;a354=1, foo;a355=1, foo;a356=1, foo;a357=1, foo;a358=1, foo;a359=1, foo;a360=1, foo;a361=1, foo;a362=1, foo;a363=1, foo;a364=1, foo;a365=1, foo;a366=1, foo;a367=1, foo;a368=1, foo;a369=1, foo;a370=1, foo;a371=1, foo;a372=1, foo;a373=1, foo;a374=1, foo;a375=1, foo;a376=1, foo;a377=1, foo;a378=1, foo;a379=1, foo;a380=1, foo;a381=1, foo;a382=1, foo;a383=1, foo;a384=1, foo;a385=1, foo;a386=1, foo;a387=1, foo;a388=1, foo;a389=1, foo;a390=1, foo;a391=1, foo;a392=1, foo;a393=1, foo;a394=1, foo;a395=1, foo;a396=1, foo;a397=1, foo;a398=1, foo;a399=1, foo;a400=1, foo;a401=1, foo;a402=1, foo;a403=1, foo;a404=1, foo;a405=1, foo;a406=1, foo;a407=1, foo;a408=1, foo;a409=1, foo;a410=1, foo;a411=1, foo;a412=1, foo;a413=1, foo;a414=1, foo;a415=1, foo;a416=1, foo;a417=1, foo;a418=1, foo;a419=1, foo;a420=1, foo;a421=1, foo;a422=1, foo;a423=1, foo;a424=1, foo;a425=1, foo;a426=1, foo;a427=1, foo;a428=1, foo;a429=1, foo;a430=1, foo;a431=1, foo;a432=1, foo;a433=1, foo;a434=1, foo;a435=1, foo;a436=1, foo;a437=1, foo;a438=1, foo;a439=1, foo;a440=1, foo;a441=1, foo;a442=1, foo;a443=1, foo;a444=1, foo;a445=1, foo;a446=1, foo;a447=1, foo;a448=1, foo;a449=1, foo;a450=1, foo;a451=1, foo;a452=1, foo;a453=1, foo;a454=1, foo;a455=1, foo;a456=1, foo;a457=1, foo;a458=1, foo;a459=1, foo;a460=1, foo;a461=1, foo;a462=1, foo;a463=1, foo;a464=1, foo;a465=1, foo;a466=1, foo;a467=1, foo;a468=1, foo;a469=1, foo;a470=1, foo;a471=1, foo;a472=1, foo;a473=1, foo;a474=1, foo;a475=1, foo;a476=1, foo;a477=1, foo;a478=1, foo;a479=1, foo;a480=1, foo;a481=1, foo;a482=1, foo;a483=1, foo;a484=1, foo;a485=1, foo;a486=1, foo;a487=1, foo;a488=1, foo;a489=1, foo;a490=1, foo;a491=1, foo;a492=1, foo;a493=1, foo;a494=1, foo;a495=1, foo;a496=1, foo;a497=1, foo;a498=1, foo;a499=1, foo;a500=1, foo;a501=1, foo;a502=1, foo;a503=1, foo;a504=1, foo;a505=1, foo;a506=1, foo;a507=1, foo;a508=1, foo;a509=1, foo;a510=1, foo;a511=1, foo;a512=1, foo;a513=1, foo;a514=1, foo;a515=1, foo;a516=1, foo;a517=1, foo;a518=1, foo;a519=1, foo;a520=1, foo;a521=1, foo;a522=1, foo;a523=1, foo;a524=1, foo;a525=1, foo;a526=1, foo;a527=1, foo;a528=1, foo;a529=1, foo;a530=1, foo;a531=1, foo;a532=1, foo;a533=1, foo;a534=1, foo;a535=1, foo;a536=1, foo;a537=1, foo;a538=1, foo;a539=1, foo;a540=1, foo;a541=1, foo;a542=1, foo;a543=1, foo;a544=1, foo;a545=1, foo;a546=1, foo;a547=1, foo;a548=1, foo;a549=1, foo;a550=1, foo;a551=1, foo;a552=1, foo;a553=1, foo;a554=1, foo;a555=1, foo;a556=1, foo;a557=1, foo;a558=1, foo;a559=1, foo;a560=1, foo;a561=1, foo;a562=1, foo;a563=1, foo;a564=1, foo;a565=1, foo;a566=1, foo;a567=1, foo;a568=1, foo;a569=1, foo;a570=1, foo;a571=1, foo;a572=1, foo;a573=1, foo;a574=1, foo;a575=1, foo;a576=1, foo;a577=1, foo;a578=1, foo;a579=1, foo;a580=1, foo;a581=1, foo;a582=1, foo;a583=1, foo;a584=1, foo;a585=1, foo;a586=1, foo;a587=1, foo;a588=1, foo;a589=1, foo;a590=1, foo;a591=1, foo;a592=1, foo;a593=1, foo;a594=1, foo;a595=1, foo;a596=1, foo;a597=1, foo;a598=1, foo;a599=1, foo;a600=1, foo;a601=1, foo;a602=1, foo;a603=1, foo;a604=1, foo;a605=1, foo;a606=1, foo;a607=1, foo;a608=1, foo;a609=1, foo;a610=1, foo;a611=1, foo;a612=1, foo;a613=1, foo;a614=1, foo;a615=1, foo;a616=1, foo;a617=1, foo;a618=1, foo;a619=1, foo;a620=1, foo;a621=1, foo;a622=1, foo;a623=1, foo;a624=1, foo;a625=1, foo;a626=1, foo;a627=1, foo;a628=1, foo;a629=1, foo;a630=1, foo;a631=1, foo;a632=1, foo;a633=1, foo;a634=1, foo;a635=1, foo;a636=1, foo;a637=1, foo;a638=1, foo;a639=1, foo;a640=1, foo;a641=1, foo;a642=1, foo;a643=1, foo;a644=1, foo;a645=1, foo;a646=1, foo;a647=1, foo;a648=1, foo;a649=1, foo;a650=1, foo;a651=1, foo;a652=1, foo;a653=1, foo;a654=1, foo;a655=1, foo;a656=1, foo;a657=1, foo;a658=1, foo;a659=1, foo;a660=1, foo;a661=1, foo;a662=1, foo;a663=1, foo;a664=1, foo;a665=1, foo;a666=1, foo;a667=1, foo;a668=1, foo;a669=1, foo;a670=1, foo;a671=1, foo;a672=1, foo;a673=1, foo;a674=1, foo;a675=1, foo;a676=1, foo;a677=1, foo;a678=1, foo;a679=1, foo;a680=1, foo;a681=1, foo;a682=1, foo;a683=1, foo;a684=1, foo;a685=1, foo;a686=1, foo;a687=1, foo;a688=1, foo;a689=1, foo;a690=1, foo;a691=1, foo;a692=1, foo;a693=1, foo;a694=1, foo;a695=1, foo;a696=1, foo;a697=1, foo;a698=1, foo;a699=1, foo;a700=1, foo;a701=1, foo;a702=1, foo;a703=1, foo;a704=1, foo;a705=1, foo;a706=1, foo;a707=1, foo;a708=1, foo;a709=1, foo;a710=1, foo;a711=1, foo;a712=1, foo;a713=1, foo;a714=1, foo;a715=1, foo;a716=1, foo;a717=1, foo;a718=1, foo;a719=1, foo;a720=1, foo;a721=1, foo;a722=1, foo;a723=1, foo;a724=1, foo;a725=1, foo;a726=1, foo;a727=1, foo;a728=1, foo;a729=1, foo;a730=1, foo;a731=1, foo;a732=1, foo;a733=1, foo;a734=1, foo;a735=1, foo;a736=1, foo;a737=1, foo;a738=1, foo;a739=1, foo;a740=1, foo;a741=1, foo;a742=1, foo;a743=1, foo;a744=1, foo;a745=1, foo;a746=1, foo;a747=1, foo;a748=1, foo;a749=1, foo;a750=1, foo;a751=1, foo;a752=1, foo;a753=1, foo;a754=1, foo;a755=1, foo;a756=1, foo;a757=1, foo;a758=1, foo;a759=1, foo;a760=1, foo;a761=1, foo;a762=1, foo;a763=1, foo;a764=1, foo;a765=1, foo;a766=1, foo;a767=1, foo;a768=1, foo;a769=1, foo;a770=1, foo;a771=1, foo;a772=1, foo;a773=1, foo;a774=1, foo;a775=1, foo;a776=1, foo;a777=1, foo;a778=1, foo;a779=1, foo;a780=1, foo;a781=1, foo;a782=1, foo;a783=1, foo;a784=1, foo;a785=1, foo;a786=1, foo;a787=1, foo;a788=1, foo;a789=1, foo;a790=1, foo;a791=1, foo;a792=1, foo;a793=1, foo;a794=1, foo;a795=1, foo;a796=1, foo;a797=1, foo;a798=1, foo;a799=1, foo;a800=1, foo;a801=1, foo;a802=1, foo;a803=1, foo;a804=1, foo;a805=1, foo;a806=1, foo;a807=1, foo;a808=1, foo;a809=1, foo;a810=1, foo;a811=1, foo;a812=1, foo;a813=1, foo;a814=1, foo;a815=1, foo;a816=1, foo;a817=1, foo;a818=1, foo;a819=1, foo;a820=1, foo;a821=1, foo;a822=1, foo;a823=1, foo;a824=1, foo;a825=1, foo;a826=1, foo;a827=1, foo;a828=1, foo;a829=1, foo;a830=1, foo;a831=1, foo;a832=1, foo;a833=1, foo;a834=1, foo;a835=1, foo;a836=1, foo;a837=1, foo;a838=1, foo;a839=1, foo;a840=1, foo;a841=1, foo;a842=1, foo;a843=1, foo;a844=1, foo;a845=1, foo;a846=1, foo;a847=1, foo;a848=1, foo;a849=1, foo;a850=1, foo;a851=1, foo;a852=1, foo;a853=1, foo;a854=1, foo;a855=1, foo;a856=1, foo;a857=1, foo;a858=1, foo;a859=1, foo;a860=1, foo;a861=1, foo;a862=1, foo;a863=1, foo;a864=1, foo;a865=1, foo;a866=1, foo;a867=1, foo;a868=1, foo;a869=1, foo;a870=1, foo;a871=1, foo;a872=1, foo;a873=1, foo;a874=1, foo;a875=1, foo;a876=1, foo;a877=1, foo;a878=1, foo;a879=1, foo;a880=1, foo;a881=1, foo;a882=1, foo;a883=1, foo;a884=1, foo;a885=1, foo;a886=1, foo;a887=1, foo;a888=1, foo;a889=1, foo;a890=1, foo;a891=1, foo;a892=1, foo;a893=1, foo;a894=1, foo;a895=1, foo;a896=1, foo;a897=1, foo;a898=1, foo;a899=1, foo;a900=1, foo;a901=1, foo;a902=1, foo;a903=1, foo;a904=1, foo;a905=1, foo;a906=1, foo;a907=1, foo;a908=1, foo;a909=1, foo;a910=1, foo;a911=1, foo;a912=1, foo;a913=1, foo;a914=1, foo;a915=1, foo;a916=1, foo;a917=1, foo;a918=1, foo;a919=1, foo;a920=1, foo;a921=1, foo;a922=1, foo;a923=1, foo;a924=1, foo;a925=1, foo;a926=1, foo;a927=1, foo;a928=1, foo;a929=1, foo;a930=1, foo;a931=1, foo;a932=1, foo;a933=1, foo;a934=1, foo;a935=1, foo;a936=1, foo;a937=1, foo;a938=1, foo;a939=1, foo;a940=1, foo;a941=1, foo;a942=1, foo;a943=1, foo;a944=1, foo;a945=1, foo;a946=1, foo;a947=1, foo;a948=1, foo;a949=1, foo;a950=1, foo;a951=1, foo;a952=1, foo;a953=1, foo;a954=1, foo;a955=1, foo;a956=1, foo;a957=1, foo;a958=1, foo;a959=1, foo;a960=1, foo;a961=1, foo;a962=1, foo;a963=1, foo;a964=1, foo;a965=1, foo;a966=1, foo;a967=1, foo;a968=1, foo;a969=1, foo;a970=1, foo;a971=1, foo;a972=1, foo;a973=1, foo;a974=1, foo;a975=1, foo;a976=1, foo;a977=1, foo;a978=1, foo;a979=1, foo;a980=1, foo;a981=1, foo;a982=1, foo;a983=1, foo;a984=1, foo;a985=1, foo;a986=1, foo;a987=1, foo;a988=1, foo;a989=1, foo;a990=1, foo;a991=1, foo;a992=1, foo;a993=1, foo;a994=1, foo;a995=1, foo;a996=1, foo;a997=1, foo;a998=1, foo;a999=1, foo;a1000=1, foo;a1001=1, foo;a1002=1, foo;a1003=1, foo;a1004=1, foo;a1005=1, foo;a1006=1, foo;a1007=1, foo;a1008=1, foo;a1009=1, foo;a1010=1, foo;a1011=1, foo;a1012=1, foo;a1013=1, foo;a1014=1, foo;a1015=1, foo;a1016=1, foo;a1017=1, foo;a1018=1, foo;a1019=1, foo;a1020=1, foo;a1021=1, foo;a1022=1, foo;a1023=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a0": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1": 1 } ], [ { "__type": "token", "value": "foo" }, { "a2": 1 } ], [ { "__type": "token", "value": "foo" }, { "a3": 1 } ], [ { "__type": "token", "value": "foo" }, { "a4": 1 } ], [ { "__type": "token", "value": "foo" }, { "a5": 1 } ], [ { "__type": "token", "value": "foo" }, { "a6": 1 } ], [ { "__type": "token", "value": "foo" }, { "a7": 1 } ], [ { "__type": "token", "value": "foo" }, { "a8": 1 } ], [ { "__type": "token", "value": "foo" }, { "a9": 1 } ], [ { "__type": "token", "value": "foo" }, { "a10": 1 } ], [ { "__type": "token", "value": "foo" }, { "a11": 1 } ], [ { "__type": "token", "value": "foo" }, { "a12": 1 } ], [ { "__type": "token", "value": "foo" }, { "a13": 1 } ], [ { "__type": "token", "value": "foo" }, { "a14": 1 } ], [ { "__type": "token", "value": "foo" }, { "a15": 1 } ], [ { "__type": "token", "value": "foo" }, { "a16": 1 } ], [ { "__type": "token", "value": "foo" }, { "a17": 1 } ], [ { "__type": "token", "value": "foo" }, { "a18": 1 } ], [ { "__type": "token", "value": "foo" }, { "a19": 1 } ], [ { "__type": "token", "value": "foo" }, { "a20": 1 } ], [ { "__type": "token", "value": "foo" }, { "a21": 1 } ], [ { "__type": "token", "value": "foo" }, { "a22": 1 } ], [ { "__type": "token", "value": "foo" }, { "a23": 1 } ], [ { "__type": "token", "value": "foo" }, { "a24": 1 } ], [ { "__type": "token", "value": "foo" }, { "a25": 1 } ], [ { "__type": "token", "value": "foo" }, { "a26": 1 } ], [ { "__type": "token", "value": "foo" }, { "a27": 1 } ], [ { "__type": "token", "value": "foo" }, { "a28": 1 } ], [ { "__type": "token", "value": "foo" }, { "a29": 1 } ], [ { "__type": "token", "value": "foo" }, { "a30": 1 } ], [ { "__type": "token", "value": "foo" }, { "a31": 1 } ], [ { "__type": "token", "value": "foo" }, { "a32": 1 } ], [ { "__type": "token", "value": "foo" }, { "a33": 1 } ], [ { "__type": "token", "value": "foo" }, { "a34": 1 } ], [ { "__type": "token", "value": "foo" }, { "a35": 1 } ], [ { "__type": "token", "value": "foo" }, { "a36": 1 } ], [ { "__type": "token", "value": "foo" }, { "a37": 1 } ], [ { "__type": "token", "value": "foo" }, { "a38": 1 } ], [ { "__type": "token", "value": "foo" }, { "a39": 1 } ], [ { "__type": "token", "value": "foo" }, { "a40": 1 } ], [ { "__type": "token", "value": "foo" }, { "a41": 1 } ], [ { "__type": "token", "value": "foo" }, { "a42": 1 } ], [ { "__type": "token", "value": "foo" }, { "a43": 1 } ], [ { "__type": "token", "value": "foo" }, { "a44": 1 } ], [ { "__type": "token", "value": "foo" }, { "a45": 1 } ], [ { "__type": "token", "value": "foo" }, { "a46": 1 } ], [ { "__type": "token", "value": "foo" }, { "a47": 1 } ], [ { "__type": "token", "value": "foo" }, { "a48": 1 } ], [ { "__type": "token", "value": "foo" }, { "a49": 1 } ], [ { "__type": "token", "value": "foo" }, { "a50": 1 } ], [ { "__type": "token", "value": "foo" }, { "a51": 1 } ], [ { "__type": "token", "value": "foo" }, { "a52": 1 } ], [ { "__type": "token", "value": "foo" }, { "a53": 1 } ], [ { "__type": "token", "value": "foo" }, { "a54": 1 } ], [ { "__type": "token", "value": "foo" }, { "a55": 1 } ], [ { "__type": "token", "value": "foo" }, { "a56": 1 } ], [ { "__type": "token", "value": "foo" }, { "a57": 1 } ], [ { "__type": "token", "value": "foo" }, { "a58": 1 } ], [ { "__type": "token", "value": "foo" }, { "a59": 1 } ], [ { "__type": "token", "value": "foo" }, { "a60": 1 } ], [ { "__type": "token", "value": "foo" }, { "a61": 1 } ], [ { "__type": "token", "value": "foo" }, { "a62": 1 } ], [ { "__type": "token", "value": "foo" }, { "a63": 1 } ], [ { "__type": "token", "value": "foo" }, { "a64": 1 } ], [ { "__type": "token", "value": "foo" }, { "a65": 1 } ], [ { "__type": "token", "value": "foo" }, { "a66": 1 } ], [ { "__type": "token", "value": "foo" }, { "a67": 1 } ], [ { "__type": "token", "value": "foo" }, { "a68": 1 } ], [ { "__type": "token", "value": "foo" }, { "a69": 1 } ], [ { "__type": "token", "value": "foo" }, { "a70": 1 } ], [ { "__type": "token", "value": "foo" }, { "a71": 1 } ], [ { "__type": "token", "value": "foo" }, { "a72": 1 } ], [ { "__type": "token", "value": "foo" }, { "a73": 1 } ], [ { "__type": "token", "value": "foo" }, { "a74": 1 } ], [ { "__type": "token", "value": "foo" }, { "a75": 1 } ], [ { "__type": "token", "value": "foo" }, { "a76": 1 } ], [ { "__type": "token", "value": "foo" }, { "a77": 1 } ], [ { "__type": "token", "value": "foo" }, { "a78": 1 } ], [ { "__type": "token", "value": "foo" }, { "a79": 1 } ], [ { "__type": "token", "value": "foo" }, { "a80": 1 } ], [ { "__type": "token", "value": "foo" }, { "a81": 1 } ], [ { "__type": "token", "value": "foo" }, { "a82": 1 } ], [ { "__type": "token", "value": "foo" }, { "a83": 1 } ], [ { "__type": "token", "value": "foo" }, { "a84": 1 } ], [ { "__type": "token", "value": "foo" }, { "a85": 1 } ], [ { "__type": "token", "value": "foo" }, { "a86": 1 } ], [ { "__type": "token", "value": "foo" }, { "a87": 1 } ], [ { "__type": "token", "value": "foo" }, { "a88": 1 } ], [ { "__type": "token", "value": "foo" }, { "a89": 1 } ], [ { "__type": "token", "value": "foo" }, { "a90": 1 } ], [ { "__type": "token", "value": "foo" }, { "a91": 1 } ], [ { "__type": "token", "value": "foo" }, { "a92": 1 } ], [ { "__type": "token", "value": "foo" }, { "a93": 1 } ], [ { "__type": "token", "value": "foo" }, { "a94": 1 } ], [ { "__type": "token", "value": "foo" }, { "a95": 1 } ], [ { "__type": "token", "value": "foo" }, { "a96": 1 } ], [ { "__type": "token", "value": "foo" }, { "a97": 1 } ], [ { "__type": "token", "value": "foo" }, { "a98": 1 } ], [ { "__type": "token", "value": "foo" }, { "a99": 1 } ], [ { "__type": "token", "value": "foo" }, { "a100": 1 } ], [ { "__type": "token", "value": "foo" }, { "a101": 1 } ], [ { "__type": "token", "value": "foo" }, { "a102": 1 } ], [ { "__type": "token", "value": "foo" }, { "a103": 1 } ], [ { "__type": "token", "value": "foo" }, { "a104": 1 } ], [ { "__type": "token", "value": "foo" }, { "a105": 1 } ], [ { "__type": "token", "value": "foo" }, { "a106": 1 } ], [ { "__type": "token", "value": "foo" }, { "a107": 1 } ], [ { "__type": "token", "value": "foo" }, { "a108": 1 } ], [ { "__type": "token", "value": "foo" }, { "a109": 1 } ], [ { "__type": "token", "value": "foo" }, { "a110": 1 } ], [ { "__type": "token", "value": "foo" }, { "a111": 1 } ], [ { "__type": "token", "value": "foo" }, { "a112": 1 } ], [ { "__type": "token", "value": "foo" }, { "a113": 1 } ], [ { "__type": "token", "value": "foo" }, { "a114": 1 } ], [ { "__type": "token", "value": "foo" }, { "a115": 1 } ], [ { "__type": "token", "value": "foo" }, { "a116": 1 } ], [ { "__type": "token", "value": "foo" }, { "a117": 1 } ], [ { "__type": "token", "value": "foo" }, { "a118": 1 } ], [ { "__type": "token", "value": "foo" }, { "a119": 1 } ], [ { "__type": "token", "value": "foo" }, { "a120": 1 } ], [ { "__type": "token", "value": "foo" }, { "a121": 1 } ], [ { "__type": "token", "value": "foo" }, { "a122": 1 } ], [ { "__type": "token", "value": "foo" }, { "a123": 1 } ], [ { "__type": "token", "value": "foo" }, { "a124": 1 } ], [ { "__type": "token", "value": "foo" }, { "a125": 1 } ], [ { "__type": "token", "value": "foo" }, { "a126": 1 } ], [ { "__type": "token", "value": "foo" }, { "a127": 1 } ], [ { "__type": "token", "value": "foo" }, { "a128": 1 } ], [ { "__type": "token", "value": "foo" }, { "a129": 1 } ], [ { "__type": "token", "value": "foo" }, { "a130": 1 } ], [ { "__type": "token", "value": "foo" }, { "a131": 1 } ], [ { "__type": "token", "value": "foo" }, { "a132": 1 } ], [ { "__type": "token", "value": "foo" }, { "a133": 1 } ], [ { "__type": "token", "value": "foo" }, { "a134": 1 } ], [ { "__type": "token", "value": "foo" }, { "a135": 1 } ], [ { "__type": "token", "value": "foo" }, { "a136": 1 } ], [ { "__type": "token", "value": "foo" }, { "a137": 1 } ], [ { "__type": "token", "value": "foo" }, { "a138": 1 } ], [ { "__type": "token", "value": "foo" }, { "a139": 1 } ], [ { "__type": "token", "value": "foo" }, { "a140": 1 } ], [ { "__type": "token", "value": "foo" }, { "a141": 1 } ], [ { "__type": "token", "value": "foo" }, { "a142": 1 } ], [ { "__type": "token", "value": "foo" }, { "a143": 1 } ], [ { "__type": "token", "value": "foo" }, { "a144": 1 } ], [ { "__type": "token", "value": "foo" }, { "a145": 1 } ], [ { "__type": "token", "value": "foo" }, { "a146": 1 } ], [ { "__type": "token", "value": "foo" }, { "a147": 1 } ], [ { "__type": "token", "value": "foo" }, { "a148": 1 } ], [ { "__type": "token", "value": "foo" }, { "a149": 1 } ], [ { "__type": "token", "value": "foo" }, { "a150": 1 } ], [ { "__type": "token", "value": "foo" }, { "a151": 1 } ], [ { "__type": "token", "value": "foo" }, { "a152": 1 } ], [ { "__type": "token", "value": "foo" }, { "a153": 1 } ], [ { "__type": "token", "value": "foo" }, { "a154": 1 } ], [ { "__type": "token", "value": "foo" }, { "a155": 1 } ], [ { "__type": "token", "value": "foo" }, { "a156": 1 } ], [ { "__type": "token", "value": "foo" }, { "a157": 1 } ], [ { "__type": "token", "value": "foo" }, { "a158": 1 } ], [ { "__type": "token", "value": "foo" }, { "a159": 1 } ], [ { "__type": "token", "value": "foo" }, { "a160": 1 } ], [ { "__type": "token", "value": "foo" }, { "a161": 1 } ], [ { "__type": "token", "value": "foo" }, { "a162": 1 } ], [ { "__type": "token", "value": "foo" }, { "a163": 1 } ], [ { "__type": "token", "value": "foo" }, { "a164": 1 } ], [ { "__type": "token", "value": "foo" }, { "a165": 1 } ], [ { "__type": "token", "value": "foo" }, { "a166": 1 } ], [ { "__type": "token", "value": "foo" }, { "a167": 1 } ], [ { "__type": "token", "value": "foo" }, { "a168": 1 } ], [ { "__type": "token", "value": "foo" }, { "a169": 1 } ], [ { "__type": "token", "value": "foo" }, { "a170": 1 } ], [ { "__type": "token", "value": "foo" }, { "a171": 1 } ], [ { "__type": "token", "value": "foo" }, { "a172": 1 } ], [ { "__type": "token", "value": "foo" }, { "a173": 1 } ], [ { "__type": "token", "value": "foo" }, { "a174": 1 } ], [ { "__type": "token", "value": "foo" }, { "a175": 1 } ], [ { "__type": "token", "value": "foo" }, { "a176": 1 } ], [ { "__type": "token", "value": "foo" }, { "a177": 1 } ], [ { "__type": "token", "value": "foo" }, { "a178": 1 } ], [ { "__type": "token", "value": "foo" }, { "a179": 1 } ], [ { "__type": "token", "value": "foo" }, { "a180": 1 } ], [ { "__type": "token", "value": "foo" }, { "a181": 1 } ], [ { "__type": "token", "value": "foo" }, { "a182": 1 } ], [ { "__type": "token", "value": "foo" }, { "a183": 1 } ], [ { "__type": "token", "value": "foo" }, { "a184": 1 } ], [ { "__type": "token", "value": "foo" }, { "a185": 1 } ], [ { "__type": "token", "value": "foo" }, { "a186": 1 } ], [ { "__type": "token", "value": "foo" }, { "a187": 1 } ], [ { "__type": "token", "value": "foo" }, { "a188": 1 } ], [ { "__type": "token", "value": "foo" }, { "a189": 1 } ], [ { "__type": "token", "value": "foo" }, { "a190": 1 } ], [ { "__type": "token", "value": "foo" }, { "a191": 1 } ], [ { "__type": "token", "value": "foo" }, { "a192": 1 } ], [ { "__type": "token", "value": "foo" }, { "a193": 1 } ], [ { "__type": "token", "value": "foo" }, { "a194": 1 } ], [ { "__type": "token", "value": "foo" }, { "a195": 1 } ], [ { "__type": "token", "value": "foo" }, { "a196": 1 } ], [ { "__type": "token", "value": "foo" }, { "a197": 1 } ], [ { "__type": "token", "value": "foo" }, { "a198": 1 } ], [ { "__type": "token", "value": "foo" }, { "a199": 1 } ], [ { "__type": "token", "value": "foo" }, { "a200": 1 } ], [ { "__type": "token", "value": "foo" }, { "a201": 1 } ], [ { "__type": "token", "value": "foo" }, { "a202": 1 } ], [ { "__type": "token", "value": "foo" }, { "a203": 1 } ], [ { "__type": "token", "value": "foo" }, { "a204": 1 } ], [ { "__type": "token", "value": "foo" }, { "a205": 1 } ], [ { "__type": "token", "value": "foo" }, { "a206": 1 } ], [ { "__type": "token", "value": "foo" }, { "a207": 1 } ], [ { "__type": "token", "value": "foo" }, { "a208": 1 } ], [ { "__type": "token", "value": "foo" }, { "a209": 1 } ], [ { "__type": "token", "value": "foo" }, { "a210": 1 } ], [ { "__type": "token", "value": "foo" }, { "a211": 1 } ], [ { "__type": "token", "value": "foo" }, { "a212": 1 } ], [ { "__type": "token", "value": "foo" }, { "a213": 1 } ], [ { "__type": "token", "value": "foo" }, { "a214": 1 } ], [ { "__type": "token", "value": "foo" }, { "a215": 1 } ], [ { "__type": "token", "value": "foo" }, { "a216": 1 } ], [ { "__type": "token", "value": "foo" }, { "a217": 1 } ], [ { "__type": "token", "value": "foo" }, { "a218": 1 } ], [ { "__type": "token", "value": "foo" }, { "a219": 1 } ], [ { "__type": "token", "value": "foo" }, { "a220": 1 } ], [ { "__type": "token", "value": "foo" }, { "a221": 1 } ], [ { "__type": "token", "value": "foo" }, { "a222": 1 } ], [ { "__type": "token", "value": "foo" }, { "a223": 1 } ], [ { "__type": "token", "value": "foo" }, { "a224": 1 } ], [ { "__type": "token", "value": "foo" }, { "a225": 1 } ], [ { "__type": "token", "value": "foo" }, { "a226": 1 } ], [ { "__type": "token", "value": "foo" }, { "a227": 1 } ], [ { "__type": "token", "value": "foo" }, { "a228": 1 } ], [ { "__type": "token", "value": "foo" }, { "a229": 1 } ], [ { "__type": "token", "value": "foo" }, { "a230": 1 } ], [ { "__type": "token", "value": "foo" }, { "a231": 1 } ], [ { "__type": "token", "value": "foo" }, { "a232": 1 } ], [ { "__type": "token", "value": "foo" }, { "a233": 1 } ], [ { "__type": "token", "value": "foo" }, { "a234": 1 } ], [ { "__type": "token", "value": "foo" }, { "a235": 1 } ], [ { "__type": "token", "value": "foo" }, { "a236": 1 } ], [ { "__type": "token", "value": "foo" }, { "a237": 1 } ], [ { "__type": "token", "value": "foo" }, { "a238": 1 } ], [ { "__type": "token", "value": "foo" }, { "a239": 1 } ], [ { "__type": "token", "value": "foo" }, { "a240": 1 } ], [ { "__type": "token", "value": "foo" }, { "a241": 1 } ], [ { "__type": "token", "value": "foo" }, { "a242": 1 } ], [ { "__type": "token", "value": "foo" }, { "a243": 1 } ], [ { "__type": "token", "value": "foo" }, { "a244": 1 } ], [ { "__type": "token", "value": "foo" }, { "a245": 1 } ], [ { "__type": "token", "value": "foo" }, { "a246": 1 } ], [ { "__type": "token", "value": "foo" }, { "a247": 1 } ], [ { "__type": "token", "value": "foo" }, { "a248": 1 } ], [ { "__type": "token", "value": "foo" }, { "a249": 1 } ], [ { "__type": "token", "value": "foo" }, { "a250": 1 } ], [ { "__type": "token", "value": "foo" }, { "a251": 1 } ], [ { "__type": "token", "value": "foo" }, { "a252": 1 } ], [ { "__type": "token", "value": "foo" }, { "a253": 1 } ], [ { "__type": "token", "value": "foo" }, { "a254": 1 } ], [ { "__type": "token", "value": "foo" }, { "a255": 1 } ], [ { "__type": "token", "value": "foo" }, { "a256": 1 } ], [ { "__type": "token", "value": "foo" }, { "a257": 1 } ], [ { "__type": "token", "value": "foo" }, { "a258": 1 } ], [ { "__type": "token", "value": "foo" }, { "a259": 1 } ], [ { "__type": "token", "value": "foo" }, { "a260": 1 } ], [ { "__type": "token", "value": "foo" }, { "a261": 1 } ], [ { "__type": "token", "value": "foo" }, { "a262": 1 } ], [ { "__type": "token", "value": "foo" }, { "a263": 1 } ], [ { "__type": "token", "value": "foo" }, { "a264": 1 } ], [ { "__type": "token", "value": "foo" }, { "a265": 1 } ], [ { "__type": "token", "value": "foo" }, { "a266": 1 } ], [ { "__type": "token", "value": "foo" }, { "a267": 1 } ], [ { "__type": "token", "value": "foo" }, { "a268": 1 } ], [ { "__type": "token", "value": "foo" }, { "a269": 1 } ], [ { "__type": "token", "value": "foo" }, { "a270": 1 } ], [ { "__type": "token", "value": "foo" }, { "a271": 1 } ], [ { "__type": "token", "value": "foo" }, { "a272": 1 } ], [ { "__type": "token", "value": "foo" }, { "a273": 1 } ], [ { "__type": "token", "value": "foo" }, { "a274": 1 } ], [ { "__type": "token", "value": "foo" }, { "a275": 1 } ], [ { "__type": "token", "value": "foo" }, { "a276": 1 } ], [ { "__type": "token", "value": "foo" }, { "a277": 1 } ], [ { "__type": "token", "value": "foo" }, { "a278": 1 } ], [ { "__type": "token", "value": "foo" }, { "a279": 1 } ], [ { "__type": "token", "value": "foo" }, { "a280": 1 } ], [ { "__type": "token", "value": "foo" }, { "a281": 1 } ], [ { "__type": "token", "value": "foo" }, { "a282": 1 } ], [ { "__type": "token", "value": "foo" }, { "a283": 1 } ], [ { "__type": "token", "value": "foo" }, { "a284": 1 } ], [ { "__type": "token", "value": "foo" }, { "a285": 1 } ], [ { "__type": "token", "value": "foo" }, { "a286": 1 } ], [ { "__type": "token", "value": "foo" }, { "a287": 1 } ], [ { "__type": "token", "value": "foo" }, { "a288": 1 } ], [ { "__type": "token", "value": "foo" }, { "a289": 1 } ], [ { "__type": "token", "value": "foo" }, { "a290": 1 } ], [ { "__type": "token", "value": "foo" }, { "a291": 1 } ], [ { "__type": "token", "value": "foo" }, { "a292": 1 } ], [ { "__type": "token", "value": "foo" }, { "a293": 1 } ], [ { "__type": "token", "value": "foo" }, { "a294": 1 } ], [ { "__type": "token", "value": "foo" }, { "a295": 1 } ], [ { "__type": "token", "value": "foo" }, { "a296": 1 } ], [ { "__type": "token", "value": "foo" }, { "a297": 1 } ], [ { "__type": "token", "value": "foo" }, { "a298": 1 } ], [ { "__type": "token", "value": "foo" }, { "a299": 1 } ], [ { "__type": "token", "value": "foo" }, { "a300": 1 } ], [ { "__type": "token", "value": "foo" }, { "a301": 1 } ], [ { "__type": "token", "value": "foo" }, { "a302": 1 } ], [ { "__type": "token", "value": "foo" }, { "a303": 1 } ], [ { "__type": "token", "value": "foo" }, { "a304": 1 } ], [ { "__type": "token", "value": "foo" }, { "a305": 1 } ], [ { "__type": "token", "value": "foo" }, { "a306": 1 } ], [ { "__type": "token", "value": "foo" }, { "a307": 1 } ], [ { "__type": "token", "value": "foo" }, { "a308": 1 } ], [ { "__type": "token", "value": "foo" }, { "a309": 1 } ], [ { "__type": "token", "value": "foo" }, { "a310": 1 } ], [ { "__type": "token", "value": "foo" }, { "a311": 1 } ], [ { "__type": "token", "value": "foo" }, { "a312": 1 } ], [ { "__type": "token", "value": "foo" }, { "a313": 1 } ], [ { "__type": "token", "value": "foo" }, { "a314": 1 } ], [ { "__type": "token", "value": "foo" }, { "a315": 1 } ], [ { "__type": "token", "value": "foo" }, { "a316": 1 } ], [ { "__type": "token", "value": "foo" }, { "a317": 1 } ], [ { "__type": "token", "value": "foo" }, { "a318": 1 } ], [ { "__type": "token", "value": "foo" }, { "a319": 1 } ], [ { "__type": "token", "value": "foo" }, { "a320": 1 } ], [ { "__type": "token", "value": "foo" }, { "a321": 1 } ], [ { "__type": "token", "value": "foo" }, { "a322": 1 } ], [ { "__type": "token", "value": "foo" }, { "a323": 1 } ], [ { "__type": "token", "value": "foo" }, { "a324": 1 } ], [ { "__type": "token", "value": "foo" }, { "a325": 1 } ], [ { "__type": "token", "value": "foo" }, { "a326": 1 } ], [ { "__type": "token", "value": "foo" }, { "a327": 1 } ], [ { "__type": "token", "value": "foo" }, { "a328": 1 } ], [ { "__type": "token", "value": "foo" }, { "a329": 1 } ], [ { "__type": "token", "value": "foo" }, { "a330": 1 } ], [ { "__type": "token", "value": "foo" }, { "a331": 1 } ], [ { "__type": "token", "value": "foo" }, { "a332": 1 } ], [ { "__type": "token", "value": "foo" }, { "a333": 1 } ], [ { "__type": "token", "value": "foo" }, { "a334": 1 } ], [ { "__type": "token", "value": "foo" }, { "a335": 1 } ], [ { "__type": "token", "value": "foo" }, { "a336": 1 } ], [ { "__type": "token", "value": "foo" }, { "a337": 1 } ], [ { "__type": "token", "value": "foo" }, { "a338": 1 } ], [ { "__type": "token", "value": "foo" }, { "a339": 1 } ], [ { "__type": "token", "value": "foo" }, { "a340": 1 } ], [ { "__type": "token", "value": "foo" }, { "a341": 1 } ], [ { "__type": "token", "value": "foo" }, { "a342": 1 } ], [ { "__type": "token", "value": "foo" }, { "a343": 1 } ], [ { "__type": "token", "value": "foo" }, { "a344": 1 } ], [ { "__type": "token", "value": "foo" }, { "a345": 1 } ], [ { "__type": "token", "value": "foo" }, { "a346": 1 } ], [ { "__type": "token", "value": "foo" }, { "a347": 1 } ], [ { "__type": "token", "value": "foo" }, { "a348": 1 } ], [ { "__type": "token", "value": "foo" }, { "a349": 1 } ], [ { "__type": "token", "value": "foo" }, { "a350": 1 } ], [ { "__type": "token", "value": "foo" }, { "a351": 1 } ], [ { "__type": "token", "value": "foo" }, { "a352": 1 } ], [ { "__type": "token", "value": "foo" }, { "a353": 1 } ], [ { "__type": "token", "value": "foo" }, { "a354": 1 } ], [ { "__type": "token", "value": "foo" }, { "a355": 1 } ], [ { "__type": "token", "value": "foo" }, { "a356": 1 } ], [ { "__type": "token", "value": "foo" }, { "a357": 1 } ], [ { "__type": "token", "value": "foo" }, { "a358": 1 } ], [ { "__type": "token", "value": "foo" }, { "a359": 1 } ], [ { "__type": "token", "value": "foo" }, { "a360": 1 } ], [ { "__type": "token", "value": "foo" }, { "a361": 1 } ], [ { "__type": "token", "value": "foo" }, { "a362": 1 } ], [ { "__type": "token", "value": "foo" }, { "a363": 1 } ], [ { "__type": "token", "value": "foo" }, { "a364": 1 } ], [ { "__type": "token", "value": "foo" }, { "a365": 1 } ], [ { "__type": "token", "value": "foo" }, { "a366": 1 } ], [ { "__type": "token", "value": "foo" }, { "a367": 1 } ], [ { "__type": "token", "value": "foo" }, { "a368": 1 } ], [ { "__type": "token", "value": "foo" }, { "a369": 1 } ], [ { "__type": "token", "value": "foo" }, { "a370": 1 } ], [ { "__type": "token", "value": "foo" }, { "a371": 1 } ], [ { "__type": "token", "value": "foo" }, { "a372": 1 } ], [ { "__type": "token", "value": "foo" }, { "a373": 1 } ], [ { "__type": "token", "value": "foo" }, { "a374": 1 } ], [ { "__type": "token", "value": "foo" }, { "a375": 1 } ], [ { "__type": "token", "value": "foo" }, { "a376": 1 } ], [ { "__type": "token", "value": "foo" }, { "a377": 1 } ], [ { "__type": "token", "value": "foo" }, { "a378": 1 } ], [ { "__type": "token", "value": "foo" }, { "a379": 1 } ], [ { "__type": "token", "value": "foo" }, { "a380": 1 } ], [ { "__type": "token", "value": "foo" }, { "a381": 1 } ], [ { "__type": "token", "value": "foo" }, { "a382": 1 } ], [ { "__type": "token", "value": "foo" }, { "a383": 1 } ], [ { "__type": "token", "value": "foo" }, { "a384": 1 } ], [ { "__type": "token", "value": "foo" }, { "a385": 1 } ], [ { "__type": "token", "value": "foo" }, { "a386": 1 } ], [ { "__type": "token", "value": "foo" }, { "a387": 1 } ], [ { "__type": "token", "value": "foo" }, { "a388": 1 } ], [ { "__type": "token", "value": "foo" }, { "a389": 1 } ], [ { "__type": "token", "value": "foo" }, { "a390": 1 } ], [ { "__type": "token", "value": "foo" }, { "a391": 1 } ], [ { "__type": "token", "value": "foo" }, { "a392": 1 } ], [ { "__type": "token", "value": "foo" }, { "a393": 1 } ], [ { "__type": "token", "value": "foo" }, { "a394": 1 } ], [ { "__type": "token", "value": "foo" }, { "a395": 1 } ], [ { "__type": "token", "value": "foo" }, { "a396": 1 } ], [ { "__type": "token", "value": "foo" }, { "a397": 1 } ], [ { "__type": "token", "value": "foo" }, { "a398": 1 } ], [ { "__type": "token", "value": "foo" }, { "a399": 1 } ], [ { "__type": "token", "value": "foo" }, { "a400": 1 } ], [ { "__type": "token", "value": "foo" }, { "a401": 1 } ], [ { "__type": "token", "value": "foo" }, { "a402": 1 } ], [ { "__type": "token", "value": "foo" }, { "a403": 1 } ], [ { "__type": "token", "value": "foo" }, { "a404": 1 } ], [ { "__type": "token", "value": "foo" }, { "a405": 1 } ], [ { "__type": "token", "value": "foo" }, { "a406": 1 } ], [ { "__type": "token", "value": "foo" }, { "a407": 1 } ], [ { "__type": "token", "value": "foo" }, { "a408": 1 } ], [ { "__type": "token", "value": "foo" }, { "a409": 1 } ], [ { "__type": "token", "value": "foo" }, { "a410": 1 } ], [ { "__type": "token", "value": "foo" }, { "a411": 1 } ], [ { "__type": "token", "value": "foo" }, { "a412": 1 } ], [ { "__type": "token", "value": "foo" }, { "a413": 1 } ], [ { "__type": "token", "value": "foo" }, { "a414": 1 } ], [ { "__type": "token", "value": "foo" }, { "a415": 1 } ], [ { "__type": "token", "value": "foo" }, { "a416": 1 } ], [ { "__type": "token", "value": "foo" }, { "a417": 1 } ], [ { "__type": "token", "value": "foo" }, { "a418": 1 } ], [ { "__type": "token", "value": "foo" }, { "a419": 1 } ], [ { "__type": "token", "value": "foo" }, { "a420": 1 } ], [ { "__type": "token", "value": "foo" }, { "a421": 1 } ], [ { "__type": "token", "value": "foo" }, { "a422": 1 } ], [ { "__type": "token", "value": "foo" }, { "a423": 1 } ], [ { "__type": "token", "value": "foo" }, { "a424": 1 } ], [ { "__type": "token", "value": "foo" }, { "a425": 1 } ], [ { "__type": "token", "value": "foo" }, { "a426": 1 } ], [ { "__type": "token", "value": "foo" }, { "a427": 1 } ], [ { "__type": "token", "value": "foo" }, { "a428": 1 } ], [ { "__type": "token", "value": "foo" }, { "a429": 1 } ], [ { "__type": "token", "value": "foo" }, { "a430": 1 } ], [ { "__type": "token", "value": "foo" }, { "a431": 1 } ], [ { "__type": "token", "value": "foo" }, { "a432": 1 } ], [ { "__type": "token", "value": "foo" }, { "a433": 1 } ], [ { "__type": "token", "value": "foo" }, { "a434": 1 } ], [ { "__type": "token", "value": "foo" }, { "a435": 1 } ], [ { "__type": "token", "value": "foo" }, { "a436": 1 } ], [ { "__type": "token", "value": "foo" }, { "a437": 1 } ], [ { "__type": "token", "value": "foo" }, { "a438": 1 } ], [ { "__type": "token", "value": "foo" }, { "a439": 1 } ], [ { "__type": "token", "value": "foo" }, { "a440": 1 } ], [ { "__type": "token", "value": "foo" }, { "a441": 1 } ], [ { "__type": "token", "value": "foo" }, { "a442": 1 } ], [ { "__type": "token", "value": "foo" }, { "a443": 1 } ], [ { "__type": "token", "value": "foo" }, { "a444": 1 } ], [ { "__type": "token", "value": "foo" }, { "a445": 1 } ], [ { "__type": "token", "value": "foo" }, { "a446": 1 } ], [ { "__type": "token", "value": "foo" }, { "a447": 1 } ], [ { "__type": "token", "value": "foo" }, { "a448": 1 } ], [ { "__type": "token", "value": "foo" }, { "a449": 1 } ], [ { "__type": "token", "value": "foo" }, { "a450": 1 } ], [ { "__type": "token", "value": "foo" }, { "a451": 1 } ], [ { "__type": "token", "value": "foo" }, { "a452": 1 } ], [ { "__type": "token", "value": "foo" }, { "a453": 1 } ], [ { "__type": "token", "value": "foo" }, { "a454": 1 } ], [ { "__type": "token", "value": "foo" }, { "a455": 1 } ], [ { "__type": "token", "value": "foo" }, { "a456": 1 } ], [ { "__type": "token", "value": "foo" }, { "a457": 1 } ], [ { "__type": "token", "value": "foo" }, { "a458": 1 } ], [ { "__type": "token", "value": "foo" }, { "a459": 1 } ], [ { "__type": "token", "value": "foo" }, { "a460": 1 } ], [ { "__type": "token", "value": "foo" }, { "a461": 1 } ], [ { "__type": "token", "value": "foo" }, { "a462": 1 } ], [ { "__type": "token", "value": "foo" }, { "a463": 1 } ], [ { "__type": "token", "value": "foo" }, { "a464": 1 } ], [ { "__type": "token", "value": "foo" }, { "a465": 1 } ], [ { "__type": "token", "value": "foo" }, { "a466": 1 } ], [ { "__type": "token", "value": "foo" }, { "a467": 1 } ], [ { "__type": "token", "value": "foo" }, { "a468": 1 } ], [ { "__type": "token", "value": "foo" }, { "a469": 1 } ], [ { "__type": "token", "value": "foo" }, { "a470": 1 } ], [ { "__type": "token", "value": "foo" }, { "a471": 1 } ], [ { "__type": "token", "value": "foo" }, { "a472": 1 } ], [ { "__type": "token", "value": "foo" }, { "a473": 1 } ], [ { "__type": "token", "value": "foo" }, { "a474": 1 } ], [ { "__type": "token", "value": "foo" }, { "a475": 1 } ], [ { "__type": "token", "value": "foo" }, { "a476": 1 } ], [ { "__type": "token", "value": "foo" }, { "a477": 1 } ], [ { "__type": "token", "value": "foo" }, { "a478": 1 } ], [ { "__type": "token", "value": "foo" }, { "a479": 1 } ], [ { "__type": "token", "value": "foo" }, { "a480": 1 } ], [ { "__type": "token", "value": "foo" }, { "a481": 1 } ], [ { "__type": "token", "value": "foo" }, { "a482": 1 } ], [ { "__type": "token", "value": "foo" }, { "a483": 1 } ], [ { "__type": "token", "value": "foo" }, { "a484": 1 } ], [ { "__type": "token", "value": "foo" }, { "a485": 1 } ], [ { "__type": "token", "value": "foo" }, { "a486": 1 } ], [ { "__type": "token", "value": "foo" }, { "a487": 1 } ], [ { "__type": "token", "value": "foo" }, { "a488": 1 } ], [ { "__type": "token", "value": "foo" }, { "a489": 1 } ], [ { "__type": "token", "value": "foo" }, { "a490": 1 } ], [ { "__type": "token", "value": "foo" }, { "a491": 1 } ], [ { "__type": "token", "value": "foo" }, { "a492": 1 } ], [ { "__type": "token", "value": "foo" }, { "a493": 1 } ], [ { "__type": "token", "value": "foo" }, { "a494": 1 } ], [ { "__type": "token", "value": "foo" }, { "a495": 1 } ], [ { "__type": "token", "value": "foo" }, { "a496": 1 } ], [ { "__type": "token", "value": "foo" }, { "a497": 1 } ], [ { "__type": "token", "value": "foo" }, { "a498": 1 } ], [ { "__type": "token", "value": "foo" }, { "a499": 1 } ], [ { "__type": "token", "value": "foo" }, { "a500": 1 } ], [ { "__type": "token", "value": "foo" }, { "a501": 1 } ], [ { "__type": "token", "value": "foo" }, { "a502": 1 } ], [ { "__type": "token", "value": "foo" }, { "a503": 1 } ], [ { "__type": "token", "value": "foo" }, { "a504": 1 } ], [ { "__type": "token", "value": "foo" }, { "a505": 1 } ], [ { "__type": "token", "value": "foo" }, { "a506": 1 } ], [ { "__type": "token", "value": "foo" }, { "a507": 1 } ], [ { "__type": "token", "value": "foo" }, { "a508": 1 } ], [ { "__type": "token", "value": "foo" }, { "a509": 1 } ], [ { "__type": "token", "value": "foo" }, { "a510": 1 } ], [ { "__type": "token", "value": "foo" }, { "a511": 1 } ], [ { "__type": "token", "value": "foo" }, { "a512": 1 } ], [ { "__type": "token", "value": "foo" }, { "a513": 1 } ], [ { "__type": "token", "value": "foo" }, { "a514": 1 } ], [ { "__type": "token", "value": "foo" }, { "a515": 1 } ], [ { "__type": "token", "value": "foo" }, { "a516": 1 } ], [ { "__type": "token", "value": "foo" }, { "a517": 1 } ], [ { "__type": "token", "value": "foo" }, { "a518": 1 } ], [ { "__type": "token", "value": "foo" }, { "a519": 1 } ], [ { "__type": "token", "value": "foo" }, { "a520": 1 } ], [ { "__type": "token", "value": "foo" }, { "a521": 1 } ], [ { "__type": "token", "value": "foo" }, { "a522": 1 } ], [ { "__type": "token", "value": "foo" }, { "a523": 1 } ], [ { "__type": "token", "value": "foo" }, { "a524": 1 } ], [ { "__type": "token", "value": "foo" }, { "a525": 1 } ], [ { "__type": "token", "value": "foo" }, { "a526": 1 } ], [ { "__type": "token", "value": "foo" }, { "a527": 1 } ], [ { "__type": "token", "value": "foo" }, { "a528": 1 } ], [ { "__type": "token", "value": "foo" }, { "a529": 1 } ], [ { "__type": "token", "value": "foo" }, { "a530": 1 } ], [ { "__type": "token", "value": "foo" }, { "a531": 1 } ], [ { "__type": "token", "value": "foo" }, { "a532": 1 } ], [ { "__type": "token", "value": "foo" }, { "a533": 1 } ], [ { "__type": "token", "value": "foo" }, { "a534": 1 } ], [ { "__type": "token", "value": "foo" }, { "a535": 1 } ], [ { "__type": "token", "value": "foo" }, { "a536": 1 } ], [ { "__type": "token", "value": "foo" }, { "a537": 1 } ], [ { "__type": "token", "value": "foo" }, { "a538": 1 } ], [ { "__type": "token", "value": "foo" }, { "a539": 1 } ], [ { "__type": "token", "value": "foo" }, { "a540": 1 } ], [ { "__type": "token", "value": "foo" }, { "a541": 1 } ], [ { "__type": "token", "value": "foo" }, { "a542": 1 } ], [ { "__type": "token", "value": "foo" }, { "a543": 1 } ], [ { "__type": "token", "value": "foo" }, { "a544": 1 } ], [ { "__type": "token", "value": "foo" }, { "a545": 1 } ], [ { "__type": "token", "value": "foo" }, { "a546": 1 } ], [ { "__type": "token", "value": "foo" }, { "a547": 1 } ], [ { "__type": "token", "value": "foo" }, { "a548": 1 } ], [ { "__type": "token", "value": "foo" }, { "a549": 1 } ], [ { "__type": "token", "value": "foo" }, { "a550": 1 } ], [ { "__type": "token", "value": "foo" }, { "a551": 1 } ], [ { "__type": "token", "value": "foo" }, { "a552": 1 } ], [ { "__type": "token", "value": "foo" }, { "a553": 1 } ], [ { "__type": "token", "value": "foo" }, { "a554": 1 } ], [ { "__type": "token", "value": "foo" }, { "a555": 1 } ], [ { "__type": "token", "value": "foo" }, { "a556": 1 } ], [ { "__type": "token", "value": "foo" }, { "a557": 1 } ], [ { "__type": "token", "value": "foo" }, { "a558": 1 } ], [ { "__type": "token", "value": "foo" }, { "a559": 1 } ], [ { "__type": "token", "value": "foo" }, { "a560": 1 } ], [ { "__type": "token", "value": "foo" }, { "a561": 1 } ], [ { "__type": "token", "value": "foo" }, { "a562": 1 } ], [ { "__type": "token", "value": "foo" }, { "a563": 1 } ], [ { "__type": "token", "value": "foo" }, { "a564": 1 } ], [ { "__type": "token", "value": "foo" }, { "a565": 1 } ], [ { "__type": "token", "value": "foo" }, { "a566": 1 } ], [ { "__type": "token", "value": "foo" }, { "a567": 1 } ], [ { "__type": "token", "value": "foo" }, { "a568": 1 } ], [ { "__type": "token", "value": "foo" }, { "a569": 1 } ], [ { "__type": "token", "value": "foo" }, { "a570": 1 } ], [ { "__type": "token", "value": "foo" }, { "a571": 1 } ], [ { "__type": "token", "value": "foo" }, { "a572": 1 } ], [ { "__type": "token", "value": "foo" }, { "a573": 1 } ], [ { "__type": "token", "value": "foo" }, { "a574": 1 } ], [ { "__type": "token", "value": "foo" }, { "a575": 1 } ], [ { "__type": "token", "value": "foo" }, { "a576": 1 } ], [ { "__type": "token", "value": "foo" }, { "a577": 1 } ], [ { "__type": "token", "value": "foo" }, { "a578": 1 } ], [ { "__type": "token", "value": "foo" }, { "a579": 1 } ], [ { "__type": "token", "value": "foo" }, { "a580": 1 } ], [ { "__type": "token", "value": "foo" }, { "a581": 1 } ], [ { "__type": "token", "value": "foo" }, { "a582": 1 } ], [ { "__type": "token", "value": "foo" }, { "a583": 1 } ], [ { "__type": "token", "value": "foo" }, { "a584": 1 } ], [ { "__type": "token", "value": "foo" }, { "a585": 1 } ], [ { "__type": "token", "value": "foo" }, { "a586": 1 } ], [ { "__type": "token", "value": "foo" }, { "a587": 1 } ], [ { "__type": "token", "value": "foo" }, { "a588": 1 } ], [ { "__type": "token", "value": "foo" }, { "a589": 1 } ], [ { "__type": "token", "value": "foo" }, { "a590": 1 } ], [ { "__type": "token", "value": "foo" }, { "a591": 1 } ], [ { "__type": "token", "value": "foo" }, { "a592": 1 } ], [ { "__type": "token", "value": "foo" }, { "a593": 1 } ], [ { "__type": "token", "value": "foo" }, { "a594": 1 } ], [ { "__type": "token", "value": "foo" }, { "a595": 1 } ], [ { "__type": "token", "value": "foo" }, { "a596": 1 } ], [ { "__type": "token", "value": "foo" }, { "a597": 1 } ], [ { "__type": "token", "value": "foo" }, { "a598": 1 } ], [ { "__type": "token", "value": "foo" }, { "a599": 1 } ], [ { "__type": "token", "value": "foo" }, { "a600": 1 } ], [ { "__type": "token", "value": "foo" }, { "a601": 1 } ], [ { "__type": "token", "value": "foo" }, { "a602": 1 } ], [ { "__type": "token", "value": "foo" }, { "a603": 1 } ], [ { "__type": "token", "value": "foo" }, { "a604": 1 } ], [ { "__type": "token", "value": "foo" }, { "a605": 1 } ], [ { "__type": "token", "value": "foo" }, { "a606": 1 } ], [ { "__type": "token", "value": "foo" }, { "a607": 1 } ], [ { "__type": "token", "value": "foo" }, { "a608": 1 } ], [ { "__type": "token", "value": "foo" }, { "a609": 1 } ], [ { "__type": "token", "value": "foo" }, { "a610": 1 } ], [ { "__type": "token", "value": "foo" }, { "a611": 1 } ], [ { "__type": "token", "value": "foo" }, { "a612": 1 } ], [ { "__type": "token", "value": "foo" }, { "a613": 1 } ], [ { "__type": "token", "value": "foo" }, { "a614": 1 } ], [ { "__type": "token", "value": "foo" }, { "a615": 1 } ], [ { "__type": "token", "value": "foo" }, { "a616": 1 } ], [ { "__type": "token", "value": "foo" }, { "a617": 1 } ], [ { "__type": "token", "value": "foo" }, { "a618": 1 } ], [ { "__type": "token", "value": "foo" }, { "a619": 1 } ], [ { "__type": "token", "value": "foo" }, { "a620": 1 } ], [ { "__type": "token", "value": "foo" }, { "a621": 1 } ], [ { "__type": "token", "value": "foo" }, { "a622": 1 } ], [ { "__type": "token", "value": "foo" }, { "a623": 1 } ], [ { "__type": "token", "value": "foo" }, { "a624": 1 } ], [ { "__type": "token", "value": "foo" }, { "a625": 1 } ], [ { "__type": "token", "value": "foo" }, { "a626": 1 } ], [ { "__type": "token", "value": "foo" }, { "a627": 1 } ], [ { "__type": "token", "value": "foo" }, { "a628": 1 } ], [ { "__type": "token", "value": "foo" }, { "a629": 1 } ], [ { "__type": "token", "value": "foo" }, { "a630": 1 } ], [ { "__type": "token", "value": "foo" }, { "a631": 1 } ], [ { "__type": "token", "value": "foo" }, { "a632": 1 } ], [ { "__type": "token", "value": "foo" }, { "a633": 1 } ], [ { "__type": "token", "value": "foo" }, { "a634": 1 } ], [ { "__type": "token", "value": "foo" }, { "a635": 1 } ], [ { "__type": "token", "value": "foo" }, { "a636": 1 } ], [ { "__type": "token", "value": "foo" }, { "a637": 1 } ], [ { "__type": "token", "value": "foo" }, { "a638": 1 } ], [ { "__type": "token", "value": "foo" }, { "a639": 1 } ], [ { "__type": "token", "value": "foo" }, { "a640": 1 } ], [ { "__type": "token", "value": "foo" }, { "a641": 1 } ], [ { "__type": "token", "value": "foo" }, { "a642": 1 } ], [ { "__type": "token", "value": "foo" }, { "a643": 1 } ], [ { "__type": "token", "value": "foo" }, { "a644": 1 } ], [ { "__type": "token", "value": "foo" }, { "a645": 1 } ], [ { "__type": "token", "value": "foo" }, { "a646": 1 } ], [ { "__type": "token", "value": "foo" }, { "a647": 1 } ], [ { "__type": "token", "value": "foo" }, { "a648": 1 } ], [ { "__type": "token", "value": "foo" }, { "a649": 1 } ], [ { "__type": "token", "value": "foo" }, { "a650": 1 } ], [ { "__type": "token", "value": "foo" }, { "a651": 1 } ], [ { "__type": "token", "value": "foo" }, { "a652": 1 } ], [ { "__type": "token", "value": "foo" }, { "a653": 1 } ], [ { "__type": "token", "value": "foo" }, { "a654": 1 } ], [ { "__type": "token", "value": "foo" }, { "a655": 1 } ], [ { "__type": "token", "value": "foo" }, { "a656": 1 } ], [ { "__type": "token", "value": "foo" }, { "a657": 1 } ], [ { "__type": "token", "value": "foo" }, { "a658": 1 } ], [ { "__type": "token", "value": "foo" }, { "a659": 1 } ], [ { "__type": "token", "value": "foo" }, { "a660": 1 } ], [ { "__type": "token", "value": "foo" }, { "a661": 1 } ], [ { "__type": "token", "value": "foo" }, { "a662": 1 } ], [ { "__type": "token", "value": "foo" }, { "a663": 1 } ], [ { "__type": "token", "value": "foo" }, { "a664": 1 } ], [ { "__type": "token", "value": "foo" }, { "a665": 1 } ], [ { "__type": "token", "value": "foo" }, { "a666": 1 } ], [ { "__type": "token", "value": "foo" }, { "a667": 1 } ], [ { "__type": "token", "value": "foo" }, { "a668": 1 } ], [ { "__type": "token", "value": "foo" }, { "a669": 1 } ], [ { "__type": "token", "value": "foo" }, { "a670": 1 } ], [ { "__type": "token", "value": "foo" }, { "a671": 1 } ], [ { "__type": "token", "value": "foo" }, { "a672": 1 } ], [ { "__type": "token", "value": "foo" }, { "a673": 1 } ], [ { "__type": "token", "value": "foo" }, { "a674": 1 } ], [ { "__type": "token", "value": "foo" }, { "a675": 1 } ], [ { "__type": "token", "value": "foo" }, { "a676": 1 } ], [ { "__type": "token", "value": "foo" }, { "a677": 1 } ], [ { "__type": "token", "value": "foo" }, { "a678": 1 } ], [ { "__type": "token", "value": "foo" }, { "a679": 1 } ], [ { "__type": "token", "value": "foo" }, { "a680": 1 } ], [ { "__type": "token", "value": "foo" }, { "a681": 1 } ], [ { "__type": "token", "value": "foo" }, { "a682": 1 } ], [ { "__type": "token", "value": "foo" }, { "a683": 1 } ], [ { "__type": "token", "value": "foo" }, { "a684": 1 } ], [ { "__type": "token", "value": "foo" }, { "a685": 1 } ], [ { "__type": "token", "value": "foo" }, { "a686": 1 } ], [ { "__type": "token", "value": "foo" }, { "a687": 1 } ], [ { "__type": "token", "value": "foo" }, { "a688": 1 } ], [ { "__type": "token", "value": "foo" }, { "a689": 1 } ], [ { "__type": "token", "value": "foo" }, { "a690": 1 } ], [ { "__type": "token", "value": "foo" }, { "a691": 1 } ], [ { "__type": "token", "value": "foo" }, { "a692": 1 } ], [ { "__type": "token", "value": "foo" }, { "a693": 1 } ], [ { "__type": "token", "value": "foo" }, { "a694": 1 } ], [ { "__type": "token", "value": "foo" }, { "a695": 1 } ], [ { "__type": "token", "value": "foo" }, { "a696": 1 } ], [ { "__type": "token", "value": "foo" }, { "a697": 1 } ], [ { "__type": "token", "value": "foo" }, { "a698": 1 } ], [ { "__type": "token", "value": "foo" }, { "a699": 1 } ], [ { "__type": "token", "value": "foo" }, { "a700": 1 } ], [ { "__type": "token", "value": "foo" }, { "a701": 1 } ], [ { "__type": "token", "value": "foo" }, { "a702": 1 } ], [ { "__type": "token", "value": "foo" }, { "a703": 1 } ], [ { "__type": "token", "value": "foo" }, { "a704": 1 } ], [ { "__type": "token", "value": "foo" }, { "a705": 1 } ], [ { "__type": "token", "value": "foo" }, { "a706": 1 } ], [ { "__type": "token", "value": "foo" }, { "a707": 1 } ], [ { "__type": "token", "value": "foo" }, { "a708": 1 } ], [ { "__type": "token", "value": "foo" }, { "a709": 1 } ], [ { "__type": "token", "value": "foo" }, { "a710": 1 } ], [ { "__type": "token", "value": "foo" }, { "a711": 1 } ], [ { "__type": "token", "value": "foo" }, { "a712": 1 } ], [ { "__type": "token", "value": "foo" }, { "a713": 1 } ], [ { "__type": "token", "value": "foo" }, { "a714": 1 } ], [ { "__type": "token", "value": "foo" }, { "a715": 1 } ], [ { "__type": "token", "value": "foo" }, { "a716": 1 } ], [ { "__type": "token", "value": "foo" }, { "a717": 1 } ], [ { "__type": "token", "value": "foo" }, { "a718": 1 } ], [ { "__type": "token", "value": "foo" }, { "a719": 1 } ], [ { "__type": "token", "value": "foo" }, { "a720": 1 } ], [ { "__type": "token", "value": "foo" }, { "a721": 1 } ], [ { "__type": "token", "value": "foo" }, { "a722": 1 } ], [ { "__type": "token", "value": "foo" }, { "a723": 1 } ], [ { "__type": "token", "value": "foo" }, { "a724": 1 } ], [ { "__type": "token", "value": "foo" }, { "a725": 1 } ], [ { "__type": "token", "value": "foo" }, { "a726": 1 } ], [ { "__type": "token", "value": "foo" }, { "a727": 1 } ], [ { "__type": "token", "value": "foo" }, { "a728": 1 } ], [ { "__type": "token", "value": "foo" }, { "a729": 1 } ], [ { "__type": "token", "value": "foo" }, { "a730": 1 } ], [ { "__type": "token", "value": "foo" }, { "a731": 1 } ], [ { "__type": "token", "value": "foo" }, { "a732": 1 } ], [ { "__type": "token", "value": "foo" }, { "a733": 1 } ], [ { "__type": "token", "value": "foo" }, { "a734": 1 } ], [ { "__type": "token", "value": "foo" }, { "a735": 1 } ], [ { "__type": "token", "value": "foo" }, { "a736": 1 } ], [ { "__type": "token", "value": "foo" }, { "a737": 1 } ], [ { "__type": "token", "value": "foo" }, { "a738": 1 } ], [ { "__type": "token", "value": "foo" }, { "a739": 1 } ], [ { "__type": "token", "value": "foo" }, { "a740": 1 } ], [ { "__type": "token", "value": "foo" }, { "a741": 1 } ], [ { "__type": "token", "value": "foo" }, { "a742": 1 } ], [ { "__type": "token", "value": "foo" }, { "a743": 1 } ], [ { "__type": "token", "value": "foo" }, { "a744": 1 } ], [ { "__type": "token", "value": "foo" }, { "a745": 1 } ], [ { "__type": "token", "value": "foo" }, { "a746": 1 } ], [ { "__type": "token", "value": "foo" }, { "a747": 1 } ], [ { "__type": "token", "value": "foo" }, { "a748": 1 } ], [ { "__type": "token", "value": "foo" }, { "a749": 1 } ], [ { "__type": "token", "value": "foo" }, { "a750": 1 } ], [ { "__type": "token", "value": "foo" }, { "a751": 1 } ], [ { "__type": "token", "value": "foo" }, { "a752": 1 } ], [ { "__type": "token", "value": "foo" }, { "a753": 1 } ], [ { "__type": "token", "value": "foo" }, { "a754": 1 } ], [ { "__type": "token", "value": "foo" }, { "a755": 1 } ], [ { "__type": "token", "value": "foo" }, { "a756": 1 } ], [ { "__type": "token", "value": "foo" }, { "a757": 1 } ], [ { "__type": "token", "value": "foo" }, { "a758": 1 } ], [ { "__type": "token", "value": "foo" }, { "a759": 1 } ], [ { "__type": "token", "value": "foo" }, { "a760": 1 } ], [ { "__type": "token", "value": "foo" }, { "a761": 1 } ], [ { "__type": "token", "value": "foo" }, { "a762": 1 } ], [ { "__type": "token", "value": "foo" }, { "a763": 1 } ], [ { "__type": "token", "value": "foo" }, { "a764": 1 } ], [ { "__type": "token", "value": "foo" }, { "a765": 1 } ], [ { "__type": "token", "value": "foo" }, { "a766": 1 } ], [ { "__type": "token", "value": "foo" }, { "a767": 1 } ], [ { "__type": "token", "value": "foo" }, { "a768": 1 } ], [ { "__type": "token", "value": "foo" }, { "a769": 1 } ], [ { "__type": "token", "value": "foo" }, { "a770": 1 } ], [ { "__type": "token", "value": "foo" }, { "a771": 1 } ], [ { "__type": "token", "value": "foo" }, { "a772": 1 } ], [ { "__type": "token", "value": "foo" }, { "a773": 1 } ], [ { "__type": "token", "value": "foo" }, { "a774": 1 } ], [ { "__type": "token", "value": "foo" }, { "a775": 1 } ], [ { "__type": "token", "value": "foo" }, { "a776": 1 } ], [ { "__type": "token", "value": "foo" }, { "a777": 1 } ], [ { "__type": "token", "value": "foo" }, { "a778": 1 } ], [ { "__type": "token", "value": "foo" }, { "a779": 1 } ], [ { "__type": "token", "value": "foo" }, { "a780": 1 } ], [ { "__type": "token", "value": "foo" }, { "a781": 1 } ], [ { "__type": "token", "value": "foo" }, { "a782": 1 } ], [ { "__type": "token", "value": "foo" }, { "a783": 1 } ], [ { "__type": "token", "value": "foo" }, { "a784": 1 } ], [ { "__type": "token", "value": "foo" }, { "a785": 1 } ], [ { "__type": "token", "value": "foo" }, { "a786": 1 } ], [ { "__type": "token", "value": "foo" }, { "a787": 1 } ], [ { "__type": "token", "value": "foo" }, { "a788": 1 } ], [ { "__type": "token", "value": "foo" }, { "a789": 1 } ], [ { "__type": "token", "value": "foo" }, { "a790": 1 } ], [ { "__type": "token", "value": "foo" }, { "a791": 1 } ], [ { "__type": "token", "value": "foo" }, { "a792": 1 } ], [ { "__type": "token", "value": "foo" }, { "a793": 1 } ], [ { "__type": "token", "value": "foo" }, { "a794": 1 } ], [ { "__type": "token", "value": "foo" }, { "a795": 1 } ], [ { "__type": "token", "value": "foo" }, { "a796": 1 } ], [ { "__type": "token", "value": "foo" }, { "a797": 1 } ], [ { "__type": "token", "value": "foo" }, { "a798": 1 } ], [ { "__type": "token", "value": "foo" }, { "a799": 1 } ], [ { "__type": "token", "value": "foo" }, { "a800": 1 } ], [ { "__type": "token", "value": "foo" }, { "a801": 1 } ], [ { "__type": "token", "value": "foo" }, { "a802": 1 } ], [ { "__type": "token", "value": "foo" }, { "a803": 1 } ], [ { "__type": "token", "value": "foo" }, { "a804": 1 } ], [ { "__type": "token", "value": "foo" }, { "a805": 1 } ], [ { "__type": "token", "value": "foo" }, { "a806": 1 } ], [ { "__type": "token", "value": "foo" }, { "a807": 1 } ], [ { "__type": "token", "value": "foo" }, { "a808": 1 } ], [ { "__type": "token", "value": "foo" }, { "a809": 1 } ], [ { "__type": "token", "value": "foo" }, { "a810": 1 } ], [ { "__type": "token", "value": "foo" }, { "a811": 1 } ], [ { "__type": "token", "value": "foo" }, { "a812": 1 } ], [ { "__type": "token", "value": "foo" }, { "a813": 1 } ], [ { "__type": "token", "value": "foo" }, { "a814": 1 } ], [ { "__type": "token", "value": "foo" }, { "a815": 1 } ], [ { "__type": "token", "value": "foo" }, { "a816": 1 } ], [ { "__type": "token", "value": "foo" }, { "a817": 1 } ], [ { "__type": "token", "value": "foo" }, { "a818": 1 } ], [ { "__type": "token", "value": "foo" }, { "a819": 1 } ], [ { "__type": "token", "value": "foo" }, { "a820": 1 } ], [ { "__type": "token", "value": "foo" }, { "a821": 1 } ], [ { "__type": "token", "value": "foo" }, { "a822": 1 } ], [ { "__type": "token", "value": "foo" }, { "a823": 1 } ], [ { "__type": "token", "value": "foo" }, { "a824": 1 } ], [ { "__type": "token", "value": "foo" }, { "a825": 1 } ], [ { "__type": "token", "value": "foo" }, { "a826": 1 } ], [ { "__type": "token", "value": "foo" }, { "a827": 1 } ], [ { "__type": "token", "value": "foo" }, { "a828": 1 } ], [ { "__type": "token", "value": "foo" }, { "a829": 1 } ], [ { "__type": "token", "value": "foo" }, { "a830": 1 } ], [ { "__type": "token", "value": "foo" }, { "a831": 1 } ], [ { "__type": "token", "value": "foo" }, { "a832": 1 } ], [ { "__type": "token", "value": "foo" }, { "a833": 1 } ], [ { "__type": "token", "value": "foo" }, { "a834": 1 } ], [ { "__type": "token", "value": "foo" }, { "a835": 1 } ], [ { "__type": "token", "value": "foo" }, { "a836": 1 } ], [ { "__type": "token", "value": "foo" }, { "a837": 1 } ], [ { "__type": "token", "value": "foo" }, { "a838": 1 } ], [ { "__type": "token", "value": "foo" }, { "a839": 1 } ], [ { "__type": "token", "value": "foo" }, { "a840": 1 } ], [ { "__type": "token", "value": "foo" }, { "a841": 1 } ], [ { "__type": "token", "value": "foo" }, { "a842": 1 } ], [ { "__type": "token", "value": "foo" }, { "a843": 1 } ], [ { "__type": "token", "value": "foo" }, { "a844": 1 } ], [ { "__type": "token", "value": "foo" }, { "a845": 1 } ], [ { "__type": "token", "value": "foo" }, { "a846": 1 } ], [ { "__type": "token", "value": "foo" }, { "a847": 1 } ], [ { "__type": "token", "value": "foo" }, { "a848": 1 } ], [ { "__type": "token", "value": "foo" }, { "a849": 1 } ], [ { "__type": "token", "value": "foo" }, { "a850": 1 } ], [ { "__type": "token", "value": "foo" }, { "a851": 1 } ], [ { "__type": "token", "value": "foo" }, { "a852": 1 } ], [ { "__type": "token", "value": "foo" }, { "a853": 1 } ], [ { "__type": "token", "value": "foo" }, { "a854": 1 } ], [ { "__type": "token", "value": "foo" }, { "a855": 1 } ], [ { "__type": "token", "value": "foo" }, { "a856": 1 } ], [ { "__type": "token", "value": "foo" }, { "a857": 1 } ], [ { "__type": "token", "value": "foo" }, { "a858": 1 } ], [ { "__type": "token", "value": "foo" }, { "a859": 1 } ], [ { "__type": "token", "value": "foo" }, { "a860": 1 } ], [ { "__type": "token", "value": "foo" }, { "a861": 1 } ], [ { "__type": "token", "value": "foo" }, { "a862": 1 } ], [ { "__type": "token", "value": "foo" }, { "a863": 1 } ], [ { "__type": "token", "value": "foo" }, { "a864": 1 } ], [ { "__type": "token", "value": "foo" }, { "a865": 1 } ], [ { "__type": "token", "value": "foo" }, { "a866": 1 } ], [ { "__type": "token", "value": "foo" }, { "a867": 1 } ], [ { "__type": "token", "value": "foo" }, { "a868": 1 } ], [ { "__type": "token", "value": "foo" }, { "a869": 1 } ], [ { "__type": "token", "value": "foo" }, { "a870": 1 } ], [ { "__type": "token", "value": "foo" }, { "a871": 1 } ], [ { "__type": "token", "value": "foo" }, { "a872": 1 } ], [ { "__type": "token", "value": "foo" }, { "a873": 1 } ], [ { "__type": "token", "value": "foo" }, { "a874": 1 } ], [ { "__type": "token", "value": "foo" }, { "a875": 1 } ], [ { "__type": "token", "value": "foo" }, { "a876": 1 } ], [ { "__type": "token", "value": "foo" }, { "a877": 1 } ], [ { "__type": "token", "value": "foo" }, { "a878": 1 } ], [ { "__type": "token", "value": "foo" }, { "a879": 1 } ], [ { "__type": "token", "value": "foo" }, { "a880": 1 } ], [ { "__type": "token", "value": "foo" }, { "a881": 1 } ], [ { "__type": "token", "value": "foo" }, { "a882": 1 } ], [ { "__type": "token", "value": "foo" }, { "a883": 1 } ], [ { "__type": "token", "value": "foo" }, { "a884": 1 } ], [ { "__type": "token", "value": "foo" }, { "a885": 1 } ], [ { "__type": "token", "value": "foo" }, { "a886": 1 } ], [ { "__type": "token", "value": "foo" }, { "a887": 1 } ], [ { "__type": "token", "value": "foo" }, { "a888": 1 } ], [ { "__type": "token", "value": "foo" }, { "a889": 1 } ], [ { "__type": "token", "value": "foo" }, { "a890": 1 } ], [ { "__type": "token", "value": "foo" }, { "a891": 1 } ], [ { "__type": "token", "value": "foo" }, { "a892": 1 } ], [ { "__type": "token", "value": "foo" }, { "a893": 1 } ], [ { "__type": "token", "value": "foo" }, { "a894": 1 } ], [ { "__type": "token", "value": "foo" }, { "a895": 1 } ], [ { "__type": "token", "value": "foo" }, { "a896": 1 } ], [ { "__type": "token", "value": "foo" }, { "a897": 1 } ], [ { "__type": "token", "value": "foo" }, { "a898": 1 } ], [ { "__type": "token", "value": "foo" }, { "a899": 1 } ], [ { "__type": "token", "value": "foo" }, { "a900": 1 } ], [ { "__type": "token", "value": "foo" }, { "a901": 1 } ], [ { "__type": "token", "value": "foo" }, { "a902": 1 } ], [ { "__type": "token", "value": "foo" }, { "a903": 1 } ], [ { "__type": "token", "value": "foo" }, { "a904": 1 } ], [ { "__type": "token", "value": "foo" }, { "a905": 1 } ], [ { "__type": "token", "value": "foo" }, { "a906": 1 } ], [ { "__type": "token", "value": "foo" }, { "a907": 1 } ], [ { "__type": "token", "value": "foo" }, { "a908": 1 } ], [ { "__type": "token", "value": "foo" }, { "a909": 1 } ], [ { "__type": "token", "value": "foo" }, { "a910": 1 } ], [ { "__type": "token", "value": "foo" }, { "a911": 1 } ], [ { "__type": "token", "value": "foo" }, { "a912": 1 } ], [ { "__type": "token", "value": "foo" }, { "a913": 1 } ], [ { "__type": "token", "value": "foo" }, { "a914": 1 } ], [ { "__type": "token", "value": "foo" }, { "a915": 1 } ], [ { "__type": "token", "value": "foo" }, { "a916": 1 } ], [ { "__type": "token", "value": "foo" }, { "a917": 1 } ], [ { "__type": "token", "value": "foo" }, { "a918": 1 } ], [ { "__type": "token", "value": "foo" }, { "a919": 1 } ], [ { "__type": "token", "value": "foo" }, { "a920": 1 } ], [ { "__type": "token", "value": "foo" }, { "a921": 1 } ], [ { "__type": "token", "value": "foo" }, { "a922": 1 } ], [ { "__type": "token", "value": "foo" }, { "a923": 1 } ], [ { "__type": "token", "value": "foo" }, { "a924": 1 } ], [ { "__type": "token", "value": "foo" }, { "a925": 1 } ], [ { "__type": "token", "value": "foo" }, { "a926": 1 } ], [ { "__type": "token", "value": "foo" }, { "a927": 1 } ], [ { "__type": "token", "value": "foo" }, { "a928": 1 } ], [ { "__type": "token", "value": "foo" }, { "a929": 1 } ], [ { "__type": "token", "value": "foo" }, { "a930": 1 } ], [ { "__type": "token", "value": "foo" }, { "a931": 1 } ], [ { "__type": "token", "value": "foo" }, { "a932": 1 } ], [ { "__type": "token", "value": "foo" }, { "a933": 1 } ], [ { "__type": "token", "value": "foo" }, { "a934": 1 } ], [ { "__type": "token", "value": "foo" }, { "a935": 1 } ], [ { "__type": "token", "value": "foo" }, { "a936": 1 } ], [ { "__type": "token", "value": "foo" }, { "a937": 1 } ], [ { "__type": "token", "value": "foo" }, { "a938": 1 } ], [ { "__type": "token", "value": "foo" }, { "a939": 1 } ], [ { "__type": "token", "value": "foo" }, { "a940": 1 } ], [ { "__type": "token", "value": "foo" }, { "a941": 1 } ], [ { "__type": "token", "value": "foo" }, { "a942": 1 } ], [ { "__type": "token", "value": "foo" }, { "a943": 1 } ], [ { "__type": "token", "value": "foo" }, { "a944": 1 } ], [ { "__type": "token", "value": "foo" }, { "a945": 1 } ], [ { "__type": "token", "value": "foo" }, { "a946": 1 } ], [ { "__type": "token", "value": "foo" }, { "a947": 1 } ], [ { "__type": "token", "value": "foo" }, { "a948": 1 } ], [ { "__type": "token", "value": "foo" }, { "a949": 1 } ], [ { "__type": "token", "value": "foo" }, { "a950": 1 } ], [ { "__type": "token", "value": "foo" }, { "a951": 1 } ], [ { "__type": "token", "value": "foo" }, { "a952": 1 } ], [ { "__type": "token", "value": "foo" }, { "a953": 1 } ], [ { "__type": "token", "value": "foo" }, { "a954": 1 } ], [ { "__type": "token", "value": "foo" }, { "a955": 1 } ], [ { "__type": "token", "value": "foo" }, { "a956": 1 } ], [ { "__type": "token", "value": "foo" }, { "a957": 1 } ], [ { "__type": "token", "value": "foo" }, { "a958": 1 } ], [ { "__type": "token", "value": "foo" }, { "a959": 1 } ], [ { "__type": "token", "value": "foo" }, { "a960": 1 } ], [ { "__type": "token", "value": "foo" }, { "a961": 1 } ], [ { "__type": "token", "value": "foo" }, { "a962": 1 } ], [ { "__type": "token", "value": "foo" }, { "a963": 1 } ], [ { "__type": "token", "value": "foo" }, { "a964": 1 } ], [ { "__type": "token", "value": "foo" }, { "a965": 1 } ], [ { "__type": "token", "value": "foo" }, { "a966": 1 } ], [ { "__type": "token", "value": "foo" }, { "a967": 1 } ], [ { "__type": "token", "value": "foo" }, { "a968": 1 } ], [ { "__type": "token", "value": "foo" }, { "a969": 1 } ], [ { "__type": "token", "value": "foo" }, { "a970": 1 } ], [ { "__type": "token", "value": "foo" }, { "a971": 1 } ], [ { "__type": "token", "value": "foo" }, { "a972": 1 } ], [ { "__type": "token", "value": "foo" }, { "a973": 1 } ], [ { "__type": "token", "value": "foo" }, { "a974": 1 } ], [ { "__type": "token", "value": "foo" }, { "a975": 1 } ], [ { "__type": "token", "value": "foo" }, { "a976": 1 } ], [ { "__type": "token", "value": "foo" }, { "a977": 1 } ], [ { "__type": "token", "value": "foo" }, { "a978": 1 } ], [ { "__type": "token", "value": "foo" }, { "a979": 1 } ], [ { "__type": "token", "value": "foo" }, { "a980": 1 } ], [ { "__type": "token", "value": "foo" }, { "a981": 1 } ], [ { "__type": "token", "value": "foo" }, { "a982": 1 } ], [ { "__type": "token", "value": "foo" }, { "a983": 1 } ], [ { "__type": "token", "value": "foo" }, { "a984": 1 } ], [ { "__type": "token", "value": "foo" }, { "a985": 1 } ], [ { "__type": "token", "value": "foo" }, { "a986": 1 } ], [ { "__type": "token", "value": "foo" }, { "a987": 1 } ], [ { "__type": "token", "value": "foo" }, { "a988": 1 } ], [ { "__type": "token", "value": "foo" }, { "a989": 1 } ], [ { "__type": "token", "value": "foo" }, { "a990": 1 } ], [ { "__type": "token", "value": "foo" }, { "a991": 1 } ], [ { "__type": "token", "value": "foo" }, { "a992": 1 } ], [ { "__type": "token", "value": "foo" }, { "a993": 1 } ], [ { "__type": "token", "value": "foo" }, { "a994": 1 } ], [ { "__type": "token", "value": "foo" }, { "a995": 1 } ], [ { "__type": "token", "value": "foo" }, { "a996": 1 } ], [ { "__type": "token", "value": "foo" }, { "a997": 1 } ], [ { "__type": "token", "value": "foo" }, { "a998": 1 } ], [ { "__type": "token", "value": "foo" }, { "a999": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1000": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1001": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1002": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1003": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1004": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1005": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1006": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1007": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1008": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1009": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1010": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1011": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1012": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1013": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1014": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1015": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1016": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1017": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1018": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1019": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1020": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1021": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1022": 1 } ], [ { "__type": "token", "value": "foo" }, { "a1023": 1 } ] ] }, { "name": "large params", "raw": [ "foo;a0=1;a1=1;a2=1;a3=1;a4=1;a5=1;a6=1;a7=1;a8=1;a9=1;a10=1;a11=1;a12=1;a13=1;a14=1;a15=1;a16=1;a17=1;a18=1;a19=1;a20=1;a21=1;a22=1;a23=1;a24=1;a25=1;a26=1;a27=1;a28=1;a29=1;a30=1;a31=1;a32=1;a33=1;a34=1;a35=1;a36=1;a37=1;a38=1;a39=1;a40=1;a41=1;a42=1;a43=1;a44=1;a45=1;a46=1;a47=1;a48=1;a49=1;a50=1;a51=1;a52=1;a53=1;a54=1;a55=1;a56=1;a57=1;a58=1;a59=1;a60=1;a61=1;a62=1;a63=1;a64=1;a65=1;a66=1;a67=1;a68=1;a69=1;a70=1;a71=1;a72=1;a73=1;a74=1;a75=1;a76=1;a77=1;a78=1;a79=1;a80=1;a81=1;a82=1;a83=1;a84=1;a85=1;a86=1;a87=1;a88=1;a89=1;a90=1;a91=1;a92=1;a93=1;a94=1;a95=1;a96=1;a97=1;a98=1;a99=1;a100=1;a101=1;a102=1;a103=1;a104=1;a105=1;a106=1;a107=1;a108=1;a109=1;a110=1;a111=1;a112=1;a113=1;a114=1;a115=1;a116=1;a117=1;a118=1;a119=1;a120=1;a121=1;a122=1;a123=1;a124=1;a125=1;a126=1;a127=1;a128=1;a129=1;a130=1;a131=1;a132=1;a133=1;a134=1;a135=1;a136=1;a137=1;a138=1;a139=1;a140=1;a141=1;a142=1;a143=1;a144=1;a145=1;a146=1;a147=1;a148=1;a149=1;a150=1;a151=1;a152=1;a153=1;a154=1;a155=1;a156=1;a157=1;a158=1;a159=1;a160=1;a161=1;a162=1;a163=1;a164=1;a165=1;a166=1;a167=1;a168=1;a169=1;a170=1;a171=1;a172=1;a173=1;a174=1;a175=1;a176=1;a177=1;a178=1;a179=1;a180=1;a181=1;a182=1;a183=1;a184=1;a185=1;a186=1;a187=1;a188=1;a189=1;a190=1;a191=1;a192=1;a193=1;a194=1;a195=1;a196=1;a197=1;a198=1;a199=1;a200=1;a201=1;a202=1;a203=1;a204=1;a205=1;a206=1;a207=1;a208=1;a209=1;a210=1;a211=1;a212=1;a213=1;a214=1;a215=1;a216=1;a217=1;a218=1;a219=1;a220=1;a221=1;a222=1;a223=1;a224=1;a225=1;a226=1;a227=1;a228=1;a229=1;a230=1;a231=1;a232=1;a233=1;a234=1;a235=1;a236=1;a237=1;a238=1;a239=1;a240=1;a241=1;a242=1;a243=1;a244=1;a245=1;a246=1;a247=1;a248=1;a249=1;a250=1;a251=1;a252=1;a253=1;a254=1;a255=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a0": 1, "a1": 1, "a2": 1, "a3": 1, "a4": 1, "a5": 1, "a6": 1, "a7": 1, "a8": 1, "a9": 1, "a10": 1, "a11": 1, "a12": 1, "a13": 1, "a14": 1, "a15": 1, "a16": 1, "a17": 1, "a18": 1, "a19": 1, "a20": 1, "a21": 1, "a22": 1, "a23": 1, "a24": 1, "a25": 1, "a26": 1, "a27": 1, "a28": 1, "a29": 1, "a30": 1, "a31": 1, "a32": 1, "a33": 1, "a34": 1, "a35": 1, "a36": 1, "a37": 1, "a38": 1, "a39": 1, "a40": 1, "a41": 1, "a42": 1, "a43": 1, "a44": 1, "a45": 1, "a46": 1, "a47": 1, "a48": 1, "a49": 1, "a50": 1, "a51": 1, "a52": 1, "a53": 1, "a54": 1, "a55": 1, "a56": 1, "a57": 1, "a58": 1, "a59": 1, "a60": 1, "a61": 1, "a62": 1, "a63": 1, "a64": 1, "a65": 1, "a66": 1, "a67": 1, "a68": 1, "a69": 1, "a70": 1, "a71": 1, "a72": 1, "a73": 1, "a74": 1, "a75": 1, "a76": 1, "a77": 1, "a78": 1, "a79": 1, "a80": 1, "a81": 1, "a82": 1, "a83": 1, "a84": 1, "a85": 1, "a86": 1, "a87": 1, "a88": 1, "a89": 1, "a90": 1, "a91": 1, "a92": 1, "a93": 1, "a94": 1, "a95": 1, "a96": 1, "a97": 1, "a98": 1, "a99": 1, "a100": 1, "a101": 1, "a102": 1, "a103": 1, "a104": 1, "a105": 1, "a106": 1, "a107": 1, "a108": 1, "a109": 1, "a110": 1, "a111": 1, "a112": 1, "a113": 1, "a114": 1, "a115": 1, "a116": 1, "a117": 1, "a118": 1, "a119": 1, "a120": 1, "a121": 1, "a122": 1, "a123": 1, "a124": 1, "a125": 1, "a126": 1, "a127": 1, "a128": 1, "a129": 1, "a130": 1, "a131": 1, "a132": 1, "a133": 1, "a134": 1, "a135": 1, "a136": 1, "a137": 1, "a138": 1, "a139": 1, "a140": 1, "a141": 1, "a142": 1, "a143": 1, "a144": 1, "a145": 1, "a146": 1, "a147": 1, "a148": 1, "a149": 1, "a150": 1, "a151": 1, "a152": 1, "a153": 1, "a154": 1, "a155": 1, "a156": 1, "a157": 1, "a158": 1, "a159": 1, "a160": 1, "a161": 1, "a162": 1, "a163": 1, "a164": 1, "a165": 1, "a166": 1, "a167": 1, "a168": 1, "a169": 1, "a170": 1, "a171": 1, "a172": 1, "a173": 1, "a174": 1, "a175": 1, "a176": 1, "a177": 1, "a178": 1, "a179": 1, "a180": 1, "a181": 1, "a182": 1, "a183": 1, "a184": 1, "a185": 1, "a186": 1, "a187": 1, "a188": 1, "a189": 1, "a190": 1, "a191": 1, "a192": 1, "a193": 1, "a194": 1, "a195": 1, "a196": 1, "a197": 1, "a198": 1, "a199": 1, "a200": 1, "a201": 1, "a202": 1, "a203": 1, "a204": 1, "a205": 1, "a206": 1, "a207": 1, "a208": 1, "a209": 1, "a210": 1, "a211": 1, "a212": 1, "a213": 1, "a214": 1, "a215": 1, "a216": 1, "a217": 1, "a218": 1, "a219": 1, "a220": 1, "a221": 1, "a222": 1, "a223": 1, "a224": 1, "a225": 1, "a226": 1, "a227": 1, "a228": 1, "a229": 1, "a230": 1, "a231": 1, "a232": 1, "a233": 1, "a234": 1, "a235": 1, "a236": 1, "a237": 1, "a238": 1, "a239": 1, "a240": 1, "a241": 1, "a242": 1, "a243": 1, "a244": 1, "a245": 1, "a246": 1, "a247": 1, "a248": 1, "a249": 1, "a250": 1, "a251": 1, "a252": 1, "a253": 1, "a254": 1, "a255": 1 } ] ] }, { "name": "large param key", "raw": [ "foo;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=1" ], "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 1 } ] ] }, { "name": "large string", "raw": [ "\"================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================\"" ], "header_type": "item", "expected": [ "================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================", {} ] }, { "name": "large escaped string", "raw": [ "\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\"" ], "header_type": "item", "expected": [ "\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"", {} ] }, { "name": "large token", "raw": [ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, {} ] } ] ================================================ FILE: Tests/TestFixtures/list.json ================================================ [ { "name": "basic list", "raw": ["1, 42"], "header_type": "list", "expected": [[1, {}], [42, {}]] }, { "name": "empty list", "raw": [""], "header_type": "list", "expected": [], "canonical": [] }, { "name": "leading SP list", "raw": [" 42, 43"], "canonical": ["42, 43"], "header_type": "list", "expected": [[42, {}], [43, {}]] }, { "name": "single item list", "raw": ["42"], "header_type": "list", "expected": [[42, {}]] }, { "name": "no whitespace list", "raw": ["1,42"], "header_type": "list", "expected": [[1, {}], [42, {}]], "canonical": ["1, 42"] }, { "name": "extra whitespace list", "raw": ["1 , 42"], "header_type": "list", "expected": [[1, {}], [42, {}]], "canonical": ["1, 42"] }, { "name": "tab separated list", "raw": ["1\t,\t42"], "header_type": "list", "expected": [[1, {}], [42, {}]], "canonical": ["1, 42"] }, { "name": "two line list", "raw": ["1", "42"], "header_type": "list", "expected": [[1, {}], [42, {}]], "canonical": ["1, 42"] }, { "name": "trailing comma list", "raw": ["1, 42,"], "header_type": "list", "must_fail": true }, { "name": "empty item list", "raw": ["1,,42"], "header_type": "list", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/listlist.json ================================================ [ { "name": "basic list of lists", "raw": ["(1 2), (42 43)"], "header_type": "list", "expected": [[[[1,{}], [2,{}]], {}], [[[42,{}], [43,{}]], {}]] }, { "name": "single item list of lists", "raw": ["(42)"], "header_type": "list", "expected": [[[[42,{}]], {}]] }, { "name": "empty item list of lists", "raw": ["()"], "header_type": "list", "expected": [[[], {}]] }, { "name": "empty middle item list of lists", "raw": ["(1),(),(42)"], "header_type": "list", "expected": [[[[1,{}]], {}], [[], {}], [[[42,{}]], {}]], "canonical": ["(1), (), (42)"] }, { "name": "extra whitespace list of lists", "raw": ["( 1 42 )"], "header_type": "list", "expected": [[[[1,{}], [42,{}]], {}]], "canonical": ["(1 42)"] }, { "name": "wrong whitespace list of lists", "raw": ["(1\t 42)"], "header_type": "list", "must_fail": true }, { "name": "no trailing parenthesis list of lists", "raw": ["(1 42"], "header_type": "list", "must_fail": true }, { "name": "no trailing parenthesis middle list of lists", "raw": ["(1 2, (42 43)"], "header_type": "list", "must_fail": true }, { "name": "no spaces in inner-list", "raw": ["(abc\"def\"?0123*dXZ3*xyz)"], "header_type": "list", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/number-generated.json ================================================ [ { "name": "1 digits of zero", "raw": [ "0" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "1 digit small integer", "raw": [ "1" ], "header_type": "item", "expected": [ 1, {} ] }, { "name": "1 digit large integer", "raw": [ "9" ], "header_type": "item", "expected": [ 9, {} ] }, { "name": "2 digits of zero", "raw": [ "00" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "2 digit small integer", "raw": [ "11" ], "header_type": "item", "expected": [ 11, {} ] }, { "name": "2 digit large integer", "raw": [ "99" ], "header_type": "item", "expected": [ 99, {} ] }, { "name": "3 digits of zero", "raw": [ "000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "3 digit small integer", "raw": [ "111" ], "header_type": "item", "expected": [ 111, {} ] }, { "name": "3 digit large integer", "raw": [ "999" ], "header_type": "item", "expected": [ 999, {} ] }, { "name": "4 digits of zero", "raw": [ "0000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "4 digit small integer", "raw": [ "1111" ], "header_type": "item", "expected": [ 1111, {} ] }, { "name": "4 digit large integer", "raw": [ "9999" ], "header_type": "item", "expected": [ 9999, {} ] }, { "name": "5 digits of zero", "raw": [ "00000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "5 digit small integer", "raw": [ "11111" ], "header_type": "item", "expected": [ 11111, {} ] }, { "name": "5 digit large integer", "raw": [ "99999" ], "header_type": "item", "expected": [ 99999, {} ] }, { "name": "6 digits of zero", "raw": [ "000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "6 digit small integer", "raw": [ "111111" ], "header_type": "item", "expected": [ 111111, {} ] }, { "name": "6 digit large integer", "raw": [ "999999" ], "header_type": "item", "expected": [ 999999, {} ] }, { "name": "7 digits of zero", "raw": [ "0000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "7 digit small integer", "raw": [ "1111111" ], "header_type": "item", "expected": [ 1111111, {} ] }, { "name": "7 digit large integer", "raw": [ "9999999" ], "header_type": "item", "expected": [ 9999999, {} ] }, { "name": "8 digits of zero", "raw": [ "00000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "8 digit small integer", "raw": [ "11111111" ], "header_type": "item", "expected": [ 11111111, {} ] }, { "name": "8 digit large integer", "raw": [ "99999999" ], "header_type": "item", "expected": [ 99999999, {} ] }, { "name": "9 digits of zero", "raw": [ "000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "9 digit small integer", "raw": [ "111111111" ], "header_type": "item", "expected": [ 111111111, {} ] }, { "name": "9 digit large integer", "raw": [ "999999999" ], "header_type": "item", "expected": [ 999999999, {} ] }, { "name": "10 digits of zero", "raw": [ "0000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "10 digit small integer", "raw": [ "1111111111" ], "header_type": "item", "expected": [ 1111111111, {} ] }, { "name": "10 digit large integer", "raw": [ "9999999999" ], "header_type": "item", "expected": [ 9999999999, {} ] }, { "name": "11 digits of zero", "raw": [ "00000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "11 digit small integer", "raw": [ "11111111111" ], "header_type": "item", "expected": [ 11111111111, {} ] }, { "name": "11 digit large integer", "raw": [ "99999999999" ], "header_type": "item", "expected": [ 99999999999, {} ] }, { "name": "12 digits of zero", "raw": [ "000000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "12 digit small integer", "raw": [ "111111111111" ], "header_type": "item", "expected": [ 111111111111, {} ] }, { "name": "12 digit large integer", "raw": [ "999999999999" ], "header_type": "item", "expected": [ 999999999999, {} ] }, { "name": "13 digits of zero", "raw": [ "0000000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "13 digit small integer", "raw": [ "1111111111111" ], "header_type": "item", "expected": [ 1111111111111, {} ] }, { "name": "13 digit large integer", "raw": [ "9999999999999" ], "header_type": "item", "expected": [ 9999999999999, {} ] }, { "name": "14 digits of zero", "raw": [ "00000000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "14 digit small integer", "raw": [ "11111111111111" ], "header_type": "item", "expected": [ 11111111111111, {} ] }, { "name": "14 digit large integer", "raw": [ "99999999999999" ], "header_type": "item", "expected": [ 99999999999999, {} ] }, { "name": "15 digits of zero", "raw": [ "000000000000000" ], "header_type": "item", "expected": [ 0, {} ], "canonical": [ "0" ] }, { "name": "15 digit small integer", "raw": [ "111111111111111" ], "header_type": "item", "expected": [ 111111111111111, {} ] }, { "name": "15 digit large integer", "raw": [ "999999999999999" ], "header_type": "item", "expected": [ 999999999999999, {} ] }, { "name": "2 digit 0, 1 fractional small decimal", "raw": [ "0.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "2 digit, 1 fractional 0 decimal", "raw": [ "1.0" ], "header_type": "item", "expected": [ 1.0, {} ], "canonical": [ "1.0" ] }, { "name": "2 digit, 1 fractional small decimal", "raw": [ "1.1" ], "header_type": "item", "expected": [ 1.1, {} ] }, { "name": "2 digit, 1 fractional large decimal", "raw": [ "9.9" ], "header_type": "item", "expected": [ 9.9, {} ] }, { "name": "3 digit 0, 2 fractional small decimal", "raw": [ "0.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "3 digit, 2 fractional 0 decimal", "raw": [ "1.00" ], "header_type": "item", "expected": [ 1.0, {} ], "canonical": [ "1.0" ] }, { "name": "3 digit, 2 fractional small decimal", "raw": [ "1.11" ], "header_type": "item", "expected": [ 1.11, {} ] }, { "name": "3 digit, 2 fractional large decimal", "raw": [ "9.99" ], "header_type": "item", "expected": [ 9.99, {} ] }, { "name": "4 digit 0, 3 fractional small decimal", "raw": [ "0.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "4 digit, 3 fractional 0 decimal", "raw": [ "1.000" ], "header_type": "item", "expected": [ 1.0, {} ], "canonical": [ "1.0" ] }, { "name": "4 digit, 3 fractional small decimal", "raw": [ "1.111" ], "header_type": "item", "expected": [ 1.111, {} ] }, { "name": "4 digit, 3 fractional large decimal", "raw": [ "9.999" ], "header_type": "item", "expected": [ 9.999, {} ] }, { "name": "3 digit 0, 1 fractional small decimal", "raw": [ "00.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "3 digit, 1 fractional 0 decimal", "raw": [ "11.0" ], "header_type": "item", "expected": [ 11.0, {} ], "canonical": [ "11.0" ] }, { "name": "3 digit, 1 fractional small decimal", "raw": [ "11.1" ], "header_type": "item", "expected": [ 11.1, {} ] }, { "name": "3 digit, 1 fractional large decimal", "raw": [ "99.9" ], "header_type": "item", "expected": [ 99.9, {} ] }, { "name": "4 digit 0, 2 fractional small decimal", "raw": [ "00.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "4 digit, 2 fractional 0 decimal", "raw": [ "11.00" ], "header_type": "item", "expected": [ 11.0, {} ], "canonical": [ "11.0" ] }, { "name": "4 digit, 2 fractional small decimal", "raw": [ "11.11" ], "header_type": "item", "expected": [ 11.11, {} ] }, { "name": "4 digit, 2 fractional large decimal", "raw": [ "99.99" ], "header_type": "item", "expected": [ 99.99, {} ] }, { "name": "5 digit 0, 3 fractional small decimal", "raw": [ "00.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "5 digit, 3 fractional 0 decimal", "raw": [ "11.000" ], "header_type": "item", "expected": [ 11.0, {} ], "canonical": [ "11.0" ] }, { "name": "5 digit, 3 fractional small decimal", "raw": [ "11.111" ], "header_type": "item", "expected": [ 11.111, {} ] }, { "name": "5 digit, 3 fractional large decimal", "raw": [ "99.999" ], "header_type": "item", "expected": [ 99.999, {} ] }, { "name": "4 digit 0, 1 fractional small decimal", "raw": [ "000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "4 digit, 1 fractional 0 decimal", "raw": [ "111.0" ], "header_type": "item", "expected": [ 111.0, {} ], "canonical": [ "111.0" ] }, { "name": "4 digit, 1 fractional small decimal", "raw": [ "111.1" ], "header_type": "item", "expected": [ 111.1, {} ] }, { "name": "4 digit, 1 fractional large decimal", "raw": [ "999.9" ], "header_type": "item", "expected": [ 999.9, {} ] }, { "name": "5 digit 0, 2 fractional small decimal", "raw": [ "000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "5 digit, 2 fractional 0 decimal", "raw": [ "111.00" ], "header_type": "item", "expected": [ 111.0, {} ], "canonical": [ "111.0" ] }, { "name": "5 digit, 2 fractional small decimal", "raw": [ "111.11" ], "header_type": "item", "expected": [ 111.11, {} ] }, { "name": "5 digit, 2 fractional large decimal", "raw": [ "999.99" ], "header_type": "item", "expected": [ 999.99, {} ] }, { "name": "6 digit 0, 3 fractional small decimal", "raw": [ "000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "6 digit, 3 fractional 0 decimal", "raw": [ "111.000" ], "header_type": "item", "expected": [ 111.0, {} ], "canonical": [ "111.0" ] }, { "name": "6 digit, 3 fractional small decimal", "raw": [ "111.111" ], "header_type": "item", "expected": [ 111.111, {} ] }, { "name": "6 digit, 3 fractional large decimal", "raw": [ "999.999" ], "header_type": "item", "expected": [ 999.999, {} ] }, { "name": "5 digit 0, 1 fractional small decimal", "raw": [ "0000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "5 digit, 1 fractional 0 decimal", "raw": [ "1111.0" ], "header_type": "item", "expected": [ 1111.0, {} ], "canonical": [ "1111.0" ] }, { "name": "5 digit, 1 fractional small decimal", "raw": [ "1111.1" ], "header_type": "item", "expected": [ 1111.1, {} ] }, { "name": "5 digit, 1 fractional large decimal", "raw": [ "9999.9" ], "header_type": "item", "expected": [ 9999.9, {} ] }, { "name": "6 digit 0, 2 fractional small decimal", "raw": [ "0000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "6 digit, 2 fractional 0 decimal", "raw": [ "1111.00" ], "header_type": "item", "expected": [ 1111.0, {} ], "canonical": [ "1111.0" ] }, { "name": "6 digit, 2 fractional small decimal", "raw": [ "1111.11" ], "header_type": "item", "expected": [ 1111.11, {} ] }, { "name": "6 digit, 2 fractional large decimal", "raw": [ "9999.99" ], "header_type": "item", "expected": [ 9999.99, {} ] }, { "name": "7 digit 0, 3 fractional small decimal", "raw": [ "0000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "7 digit, 3 fractional 0 decimal", "raw": [ "1111.000" ], "header_type": "item", "expected": [ 1111.0, {} ], "canonical": [ "1111.0" ] }, { "name": "7 digit, 3 fractional small decimal", "raw": [ "1111.111" ], "header_type": "item", "expected": [ 1111.111, {} ] }, { "name": "7 digit, 3 fractional large decimal", "raw": [ "9999.999" ], "header_type": "item", "expected": [ 9999.999, {} ] }, { "name": "6 digit 0, 1 fractional small decimal", "raw": [ "00000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "6 digit, 1 fractional 0 decimal", "raw": [ "11111.0" ], "header_type": "item", "expected": [ 11111.0, {} ], "canonical": [ "11111.0" ] }, { "name": "6 digit, 1 fractional small decimal", "raw": [ "11111.1" ], "header_type": "item", "expected": [ 11111.1, {} ] }, { "name": "6 digit, 1 fractional large decimal", "raw": [ "99999.9" ], "header_type": "item", "expected": [ 99999.9, {} ] }, { "name": "7 digit 0, 2 fractional small decimal", "raw": [ "00000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "7 digit, 2 fractional 0 decimal", "raw": [ "11111.00" ], "header_type": "item", "expected": [ 11111.0, {} ], "canonical": [ "11111.0" ] }, { "name": "7 digit, 2 fractional small decimal", "raw": [ "11111.11" ], "header_type": "item", "expected": [ 11111.11, {} ] }, { "name": "7 digit, 2 fractional large decimal", "raw": [ "99999.99" ], "header_type": "item", "expected": [ 99999.99, {} ] }, { "name": "8 digit 0, 3 fractional small decimal", "raw": [ "00000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "8 digit, 3 fractional 0 decimal", "raw": [ "11111.000" ], "header_type": "item", "expected": [ 11111.0, {} ], "canonical": [ "11111.0" ] }, { "name": "8 digit, 3 fractional small decimal", "raw": [ "11111.111" ], "header_type": "item", "expected": [ 11111.111, {} ] }, { "name": "8 digit, 3 fractional large decimal", "raw": [ "99999.999" ], "header_type": "item", "expected": [ 99999.999, {} ] }, { "name": "7 digit 0, 1 fractional small decimal", "raw": [ "000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "7 digit, 1 fractional 0 decimal", "raw": [ "111111.0" ], "header_type": "item", "expected": [ 111111.0, {} ], "canonical": [ "111111.0" ] }, { "name": "7 digit, 1 fractional small decimal", "raw": [ "111111.1" ], "header_type": "item", "expected": [ 111111.1, {} ] }, { "name": "7 digit, 1 fractional large decimal", "raw": [ "999999.9" ], "header_type": "item", "expected": [ 999999.9, {} ] }, { "name": "8 digit 0, 2 fractional small decimal", "raw": [ "000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "8 digit, 2 fractional 0 decimal", "raw": [ "111111.00" ], "header_type": "item", "expected": [ 111111.0, {} ], "canonical": [ "111111.0" ] }, { "name": "8 digit, 2 fractional small decimal", "raw": [ "111111.11" ], "header_type": "item", "expected": [ 111111.11, {} ] }, { "name": "8 digit, 2 fractional large decimal", "raw": [ "999999.99" ], "header_type": "item", "expected": [ 999999.99, {} ] }, { "name": "9 digit 0, 3 fractional small decimal", "raw": [ "000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "9 digit, 3 fractional 0 decimal", "raw": [ "111111.000" ], "header_type": "item", "expected": [ 111111.0, {} ], "canonical": [ "111111.0" ] }, { "name": "9 digit, 3 fractional small decimal", "raw": [ "111111.111" ], "header_type": "item", "expected": [ 111111.111, {} ] }, { "name": "9 digit, 3 fractional large decimal", "raw": [ "999999.999" ], "header_type": "item", "expected": [ 999999.999, {} ] }, { "name": "8 digit 0, 1 fractional small decimal", "raw": [ "0000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "8 digit, 1 fractional 0 decimal", "raw": [ "1111111.0" ], "header_type": "item", "expected": [ 1111111.0, {} ], "canonical": [ "1111111.0" ] }, { "name": "8 digit, 1 fractional small decimal", "raw": [ "1111111.1" ], "header_type": "item", "expected": [ 1111111.1, {} ] }, { "name": "8 digit, 1 fractional large decimal", "raw": [ "9999999.9" ], "header_type": "item", "expected": [ 9999999.9, {} ] }, { "name": "9 digit 0, 2 fractional small decimal", "raw": [ "0000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "9 digit, 2 fractional 0 decimal", "raw": [ "1111111.00" ], "header_type": "item", "expected": [ 1111111.0, {} ], "canonical": [ "1111111.0" ] }, { "name": "9 digit, 2 fractional small decimal", "raw": [ "1111111.11" ], "header_type": "item", "expected": [ 1111111.11, {} ] }, { "name": "9 digit, 2 fractional large decimal", "raw": [ "9999999.99" ], "header_type": "item", "expected": [ 9999999.99, {} ] }, { "name": "10 digit 0, 3 fractional small decimal", "raw": [ "0000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "10 digit, 3 fractional 0 decimal", "raw": [ "1111111.000" ], "header_type": "item", "expected": [ 1111111.0, {} ], "canonical": [ "1111111.0" ] }, { "name": "10 digit, 3 fractional small decimal", "raw": [ "1111111.111" ], "header_type": "item", "expected": [ 1111111.111, {} ] }, { "name": "10 digit, 3 fractional large decimal", "raw": [ "9999999.999" ], "header_type": "item", "expected": [ 9999999.999, {} ] }, { "name": "9 digit 0, 1 fractional small decimal", "raw": [ "00000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "9 digit, 1 fractional 0 decimal", "raw": [ "11111111.0" ], "header_type": "item", "expected": [ 11111111.0, {} ], "canonical": [ "11111111.0" ] }, { "name": "9 digit, 1 fractional small decimal", "raw": [ "11111111.1" ], "header_type": "item", "expected": [ 11111111.1, {} ] }, { "name": "9 digit, 1 fractional large decimal", "raw": [ "99999999.9" ], "header_type": "item", "expected": [ 99999999.9, {} ] }, { "name": "10 digit 0, 2 fractional small decimal", "raw": [ "00000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "10 digit, 2 fractional 0 decimal", "raw": [ "11111111.00" ], "header_type": "item", "expected": [ 11111111.0, {} ], "canonical": [ "11111111.0" ] }, { "name": "10 digit, 2 fractional small decimal", "raw": [ "11111111.11" ], "header_type": "item", "expected": [ 11111111.11, {} ] }, { "name": "10 digit, 2 fractional large decimal", "raw": [ "99999999.99" ], "header_type": "item", "expected": [ 99999999.99, {} ] }, { "name": "11 digit 0, 3 fractional small decimal", "raw": [ "00000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "11 digit, 3 fractional 0 decimal", "raw": [ "11111111.000" ], "header_type": "item", "expected": [ 11111111.0, {} ], "canonical": [ "11111111.0" ] }, { "name": "11 digit, 3 fractional small decimal", "raw": [ "11111111.111" ], "header_type": "item", "expected": [ 11111111.111, {} ] }, { "name": "11 digit, 3 fractional large decimal", "raw": [ "99999999.999" ], "header_type": "item", "expected": [ 99999999.999, {} ] }, { "name": "10 digit 0, 1 fractional small decimal", "raw": [ "000000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "10 digit, 1 fractional 0 decimal", "raw": [ "111111111.0" ], "header_type": "item", "expected": [ 111111111.0, {} ], "canonical": [ "111111111.0" ] }, { "name": "10 digit, 1 fractional small decimal", "raw": [ "111111111.1" ], "header_type": "item", "expected": [ 111111111.1, {} ] }, { "name": "10 digit, 1 fractional large decimal", "raw": [ "999999999.9" ], "header_type": "item", "expected": [ 999999999.9, {} ] }, { "name": "11 digit 0, 2 fractional small decimal", "raw": [ "000000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "11 digit, 2 fractional 0 decimal", "raw": [ "111111111.00" ], "header_type": "item", "expected": [ 111111111.0, {} ], "canonical": [ "111111111.0" ] }, { "name": "11 digit, 2 fractional small decimal", "raw": [ "111111111.11" ], "header_type": "item", "expected": [ 111111111.11, {} ] }, { "name": "11 digit, 2 fractional large decimal", "raw": [ "999999999.99" ], "header_type": "item", "expected": [ 999999999.99, {} ] }, { "name": "12 digit 0, 3 fractional small decimal", "raw": [ "000000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "12 digit, 3 fractional 0 decimal", "raw": [ "111111111.000" ], "header_type": "item", "expected": [ 111111111.0, {} ], "canonical": [ "111111111.0" ] }, { "name": "12 digit, 3 fractional small decimal", "raw": [ "111111111.111" ], "header_type": "item", "expected": [ 111111111.111, {} ] }, { "name": "12 digit, 3 fractional large decimal", "raw": [ "999999999.999" ], "header_type": "item", "expected": [ 999999999.999, {} ] }, { "name": "11 digit 0, 1 fractional small decimal", "raw": [ "0000000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "11 digit, 1 fractional 0 decimal", "raw": [ "1111111111.0" ], "header_type": "item", "expected": [ 1111111111.0, {} ], "canonical": [ "1111111111.0" ] }, { "name": "11 digit, 1 fractional small decimal", "raw": [ "1111111111.1" ], "header_type": "item", "expected": [ 1111111111.1, {} ] }, { "name": "11 digit, 1 fractional large decimal", "raw": [ "9999999999.9" ], "header_type": "item", "expected": [ 9999999999.9, {} ] }, { "name": "12 digit 0, 2 fractional small decimal", "raw": [ "0000000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "12 digit, 2 fractional 0 decimal", "raw": [ "1111111111.00" ], "header_type": "item", "expected": [ 1111111111.0, {} ], "canonical": [ "1111111111.0" ] }, { "name": "12 digit, 2 fractional small decimal", "raw": [ "1111111111.11" ], "header_type": "item", "expected": [ 1111111111.11, {} ] }, { "name": "12 digit, 2 fractional large decimal", "raw": [ "9999999999.99" ], "header_type": "item", "expected": [ 9999999999.99, {} ] }, { "name": "13 digit 0, 3 fractional small decimal", "raw": [ "0000000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "13 digit, 3 fractional 0 decimal", "raw": [ "1111111111.000" ], "header_type": "item", "expected": [ 1111111111.0, {} ], "canonical": [ "1111111111.0" ] }, { "name": "13 digit, 3 fractional small decimal", "raw": [ "1111111111.111" ], "header_type": "item", "expected": [ 1111111111.111, {} ] }, { "name": "13 digit, 3 fractional large decimal", "raw": [ "9999999999.999" ], "header_type": "item", "expected": [ 9999999999.999, {} ] }, { "name": "12 digit 0, 1 fractional small decimal", "raw": [ "00000000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "12 digit, 1 fractional 0 decimal", "raw": [ "11111111111.0" ], "header_type": "item", "expected": [ 11111111111.0, {} ], "canonical": [ "11111111111.0" ] }, { "name": "12 digit, 1 fractional small decimal", "raw": [ "11111111111.1" ], "header_type": "item", "expected": [ 11111111111.1, {} ] }, { "name": "12 digit, 1 fractional large decimal", "raw": [ "99999999999.9" ], "header_type": "item", "expected": [ 99999999999.9, {} ] }, { "name": "13 digit 0, 2 fractional small decimal", "raw": [ "00000000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "13 digit, 2 fractional 0 decimal", "raw": [ "11111111111.00" ], "header_type": "item", "expected": [ 11111111111.0, {} ], "canonical": [ "11111111111.0" ] }, { "name": "13 digit, 2 fractional small decimal", "raw": [ "11111111111.11" ], "header_type": "item", "expected": [ 11111111111.11, {} ] }, { "name": "13 digit, 2 fractional large decimal", "raw": [ "99999999999.99" ], "header_type": "item", "expected": [ 99999999999.99, {} ] }, { "name": "14 digit 0, 3 fractional small decimal", "raw": [ "00000000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "14 digit, 3 fractional 0 decimal", "raw": [ "11111111111.000" ], "header_type": "item", "expected": [ 11111111111.0, {} ], "canonical": [ "11111111111.0" ] }, { "name": "14 digit, 3 fractional small decimal", "raw": [ "11111111111.111" ], "header_type": "item", "expected": [ 11111111111.111, {} ] }, { "name": "14 digit, 3 fractional large decimal", "raw": [ "99999999999.999" ], "header_type": "item", "expected": [ 99999999999.999, {} ] }, { "name": "13 digit 0, 1 fractional small decimal", "raw": [ "000000000000.1" ], "header_type": "item", "expected": [ 0.1, {} ], "canonical": [ "0.1" ] }, { "name": "13 digit, 1 fractional 0 decimal", "raw": [ "111111111111.0" ], "header_type": "item", "expected": [ 111111111111.0, {} ], "canonical": [ "111111111111.0" ] }, { "name": "13 digit, 1 fractional small decimal", "raw": [ "111111111111.1" ], "header_type": "item", "expected": [ 111111111111.1, {} ] }, { "name": "13 digit, 1 fractional large decimal", "raw": [ "999999999999.9" ], "header_type": "item", "expected": [ 999999999999.9, {} ] }, { "name": "14 digit 0, 2 fractional small decimal", "raw": [ "000000000000.11" ], "header_type": "item", "expected": [ 0.11, {} ], "canonical": [ "0.11" ] }, { "name": "14 digit, 2 fractional 0 decimal", "raw": [ "111111111111.00" ], "header_type": "item", "expected": [ 111111111111.0, {} ], "canonical": [ "111111111111.0" ] }, { "name": "14 digit, 2 fractional small decimal", "raw": [ "111111111111.11" ], "header_type": "item", "expected": [ 111111111111.11, {} ] }, { "name": "14 digit, 2 fractional large decimal", "raw": [ "999999999999.99" ], "header_type": "item", "expected": [ 999999999999.99, {} ] }, { "name": "15 digit 0, 3 fractional small decimal", "raw": [ "000000000000.111" ], "header_type": "item", "expected": [ 0.111, {} ], "canonical": [ "0.111" ] }, { "name": "15 digit, 3 fractional 0 decimal", "raw": [ "111111111111.000" ], "header_type": "item", "expected": [ 111111111111.0, {} ], "canonical": [ "111111111111.0" ] }, { "name": "15 digit, 3 fractional small decimal", "raw": [ "111111111111.111" ], "header_type": "item", "expected": [ 111111111111.111, {} ] }, { "name": "15 digit, 3 fractional large decimal", "raw": [ "999999999999.999" ], "header_type": "item", "expected": [ 999999999999.999, {} ] }, { "name": "too many digit 0 decimal", "raw": [ "000000000000000.0" ], "header_type": "item", "must_fail": true }, { "name": "too many fractional digits 0 decimal", "raw": [ "000000000000.0000" ], "header_type": "item", "must_fail": true }, { "name": "too many digit 9 decimal", "raw": [ "999999999999999.9" ], "header_type": "item", "must_fail": true }, { "name": "too many fractional digits 9 decimal", "raw": [ "999999999999.9999" ], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/number.json ================================================ [ { "name": "basic integer", "raw": ["42"], "header_type": "item", "expected": [42, {}] }, { "name": "zero integer", "raw": ["0"], "header_type": "item", "expected": [0, {}] }, { "name": "leading 0 zero", "raw": ["00"], "header_type": "item", "expected": [0, {}], "canonical": ["0"] }, { "name": "negative zero", "raw": ["-0"], "header_type": "item", "expected": [0, {}], "canonical": ["0"] }, { "name": "double negative zero", "raw": ["--0"], "header_type": "item", "must_fail": true }, { "name": "negative integer", "raw": ["-42"], "header_type": "item", "expected": [-42, {}] }, { "name": "leading 0 integer", "raw": ["042"], "header_type": "item", "expected": [42, {}], "canonical": ["42"] }, { "name": "leading 0 negative integer", "raw": ["-042"], "header_type": "item", "expected": [-42, {}], "canonical": ["-42"] }, { "name": "leading 0 zero", "raw": ["00"], "header_type": "item", "expected": [0, {}], "canonical": ["0"] }, { "name": "comma", "raw": ["2,3"], "header_type": "item", "must_fail": true }, { "name": "negative non-DIGIT first character", "raw": ["-a23"], "header_type": "item", "must_fail": true }, { "name": "sign out of place", "raw": ["4-2"], "header_type": "item", "must_fail": true }, { "name": "whitespace after sign", "raw": ["- 42"], "header_type": "item", "must_fail": true }, { "name": "long integer", "raw": ["123456789012345"], "header_type": "item", "expected": [123456789012345, {}] }, { "name": "long negative integer", "raw": ["-123456789012345"], "header_type": "item", "expected": [-123456789012345, {}] }, { "name": "too long integer", "raw": ["1234567890123456"], "header_type": "item", "must_fail": true }, { "name": "negative too long integer", "raw": ["-1234567890123456"], "header_type": "item", "must_fail": true }, { "name": "simple decimal", "raw": ["1.23"], "header_type": "item", "expected": [1.23, {}] }, { "name": "negative decimal", "raw": ["-1.23"], "header_type": "item", "expected": [-1.23, {}] }, { "name": "decimal, whitespace after decimal", "raw": ["1. 23"], "header_type": "item", "must_fail": true }, { "name": "decimal, whitespace before decimal", "raw": ["1 .23"], "header_type": "item", "must_fail": true }, { "name": "negative decimal, whitespace after sign", "raw": ["- 1.23"], "header_type": "item", "must_fail": true }, { "name": "tricky precision decimal", "raw": ["123456789012.1"], "header_type": "item", "expected": [123456789012.1, {}] }, { "name": "double decimal decimal", "raw": ["1.5.4"], "header_type": "item", "must_fail": true }, { "name": "adjacent double decimal decimal", "raw": ["1..4"], "header_type": "item", "must_fail": true }, { "name": "decimal with three fractional digits", "raw": ["1.123"], "header_type": "item", "expected": [1.123, {}] }, { "name": "negative decimal with three fractional digits", "raw": ["-1.123"], "header_type": "item", "expected": [-1.123, {}] }, { "name": "decimal with four fractional digits", "raw": ["1.1234"], "header_type": "item", "must_fail": true }, { "name": "negative decimal with four fractional digits", "raw": ["-1.1234"], "header_type": "item", "must_fail": true }, { "name": "decimal with thirteen integer digits", "raw": ["1234567890123.0"], "header_type": "item", "must_fail": true }, { "name": "negative decimal with thirteen integer digits", "raw": ["-1234567890123.0"], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/param-dict.json ================================================ [ { "name": "basic parameterised dict", "raw": ["abc=123;a=1;b=2, def=456, ghi=789;q=9;r=\"+w\""], "header_type": "dictionary", "expected": { "abc": [123, {"a": 1, "b": 2}], "def": [456, {}], "ghi": [789, {"q": 9, "r": "+w"}] } }, { "name": "single item parameterised dict", "raw": ["a=b; q=1.0"], "header_type": "dictionary", "expected": { "a": [{"__type": "token", "value": "b"}, {"q": 1.0}] }, "canonical": ["a=b;q=1.0"] }, { "name": "list item parameterised dictionary", "raw": ["a=(1 2); q=1.0"], "header_type": "dictionary", "expected": {"a": [[[1, {}], [2, {}]], {"q": 1.0}]}, "canonical": ["a=(1 2);q=1.0"] }, { "name": "missing parameter value parameterised dict", "raw": ["a=3;c;d=5"], "header_type": "dictionary", "expected": { "a": [3, {"c": true, "d": 5}] } }, { "name": "terminal missing parameter value parameterised dict", "raw": ["a=3;c=5;d"], "header_type": "dictionary", "expected": { "a": [3, {"c": 5, "d": true}] } }, { "name": "no whitespace parameterised dict", "raw": ["a=b;c=1,d=e;f=2"], "header_type": "dictionary", "expected": { "a": [{"__type": "token", "value": "b"}, {"c": 1}], "d": [{"__type": "token", "value": "e"}, {"f": 2}] }, "canonical": ["a=b;c=1, d=e;f=2"] }, { "name": "whitespace before = parameterised dict", "raw": ["a=b;q =0.5"], "header_type": "dictionary", "must_fail": true }, { "name": "whitespace after = parameterised dict", "raw": ["a=b;q= 0.5"], "header_type": "dictionary", "must_fail": true }, { "name": "whitespace before ; parameterised dict", "raw": ["a=b ;q=0.5"], "header_type": "dictionary", "must_fail": true }, { "name": "whitespace after ; parameterised dict", "raw": ["a=b; q=0.5"], "header_type": "dictionary", "expected": { "a": [{"__type": "token", "value": "b"}, {"q": 0.5}] }, "canonical": ["a=b;q=0.5"] }, { "name": "extra whitespace parameterised dict", "raw": ["a=b; c=1 , d=e; f=2; g=3"], "header_type": "dictionary", "expected": { "a": [{"__type": "token", "value": "b"}, {"c": 1}], "d": [{"__type": "token", "value": "e"}, {"f": 2, "g": 3}] }, "canonical": ["a=b;c=1, d=e;f=2;g=3"] }, { "name": "two lines parameterised list", "raw": ["a=b;c=1", "d=e;f=2"], "header_type": "dictionary", "expected": { "a": [{"__type": "token", "value": "b"}, {"c": 1}], "d": [{"__type": "token", "value": "e"}, {"f": 2}] }, "canonical": ["a=b;c=1, d=e;f=2"] }, { "name": "trailing comma parameterised list", "raw": ["a=b; q=1.0,"], "header_type": "dictionary", "must_fail": true }, { "name": "empty item parameterised list", "raw": ["a=b; q=1.0,,c=d"], "header_type": "dictionary", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/param-list.json ================================================ [ { "name": "basic parameterised list", "raw": ["abc_123;a=1;b=2; cdef_456, ghi;q=9;r=\"+w\""], "header_type": "list", "expected": [ [{"__type": "token", "value": "abc_123"}, {"a": 1, "b": 2, "cdef_456": true}], [{"__type": "token", "value": "ghi"}, {"q": 9, "r": "+w"}] ], "canonical": ["abc_123;a=1;b=2;cdef_456, ghi;q=9;r=\"+w\""] }, { "name": "single item parameterised list", "raw": ["text/html;q=1.0"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {"q": 1.0}] ] }, { "name": "missing parameter value parameterised list", "raw": ["text/html;a;q=1.0"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {"a": true, "q": 1.0}] ] }, { "name": "missing terminal parameter value parameterised list", "raw": ["text/html;q=1.0;a"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {"q": 1.0, "a": true}] ] }, { "name": "no whitespace parameterised list", "raw": ["text/html,text/plain;q=0.5"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {}], [{"__type": "token", "value": "text/plain"}, {"q": 0.5}] ], "canonical": ["text/html, text/plain;q=0.5"] }, { "name": "whitespace before = parameterised list", "raw": ["text/html, text/plain;q =0.5"], "header_type": "list", "must_fail": true }, { "name": "whitespace after = parameterised list", "raw": ["text/html, text/plain;q= 0.5"], "header_type": "list", "must_fail": true }, { "name": "whitespace before ; parameterised list", "raw": ["text/html, text/plain ;q=0.5"], "header_type": "list", "must_fail": true }, { "name": "whitespace after ; parameterised list", "raw": ["text/html, text/plain; q=0.5"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {}], [{"__type": "token", "value": "text/plain"}, {"q": 0.5}] ], "canonical": ["text/html, text/plain;q=0.5"] }, { "name": "extra whitespace parameterised list", "raw": ["text/html , text/plain; q=0.5; charset=utf-8"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {}], [{"__type": "token", "value": "text/plain"}, {"q": 0.5, "charset": {"__type": "token", "value": "utf-8"} }] ], "canonical": ["text/html, text/plain;q=0.5;charset=utf-8"] }, { "name": "two lines parameterised list", "raw": ["text/html", "text/plain;q=0.5"], "header_type": "list", "expected": [ [{"__type": "token", "value": "text/html"}, {}], [{"__type": "token", "value": "text/plain"}, {"q": 0.5}] ], "canonical": ["text/html, text/plain;q=0.5"] }, { "name": "trailing comma parameterised list", "raw": ["text/html,text/plain;q=0.5,"], "header_type": "list", "must_fail": true }, { "name": "empty item parameterised list", "raw": ["text/html,,text/plain;q=0.5,"], "header_type": "list", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/param-listlist.json ================================================ [ { "name": "parameterised inner list", "raw": ["(abc_123);a=1;b=2, cdef_456"], "header_type": "list", "expected": [ [ [[{"__type": "token", "value": "abc_123"}, {}]], {"a": 1, "b": 2} ], [{"__type": "token", "value": "cdef_456"}, {}] ] }, { "name": "parameterised inner list item", "raw": ["(abc_123;a=1;b=2;cdef_456)"], "header_type": "list", "expected": [ [ [[{"__type": "token", "value": "abc_123"}, {"a": 1, "b": 2, "cdef_456": true}]], {} ] ] }, { "name": "parameterised inner list with parameterised item", "raw": ["(abc_123;a=1;b=2);cdef_456"], "header_type": "list", "expected": [ [ [[{"__type": "token", "value": "abc_123"}, {"a": 1, "b": 2}]], {"cdef_456": true} ] ] } ] ================================================ FILE: Tests/TestFixtures/serialisation-tests/key-generated.json ================================================ [ { "name": "0x00 in dictionary key - serialise only", "expected": { "a\u0000a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x01 in dictionary key - serialise only", "expected": { "a\u0001a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x02 in dictionary key - serialise only", "expected": { "a\u0002a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x03 in dictionary key - serialise only", "expected": { "a\u0003a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x04 in dictionary key - serialise only", "expected": { "a\u0004a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x05 in dictionary key - serialise only", "expected": { "a\u0005a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x06 in dictionary key - serialise only", "expected": { "a\u0006a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x07 in dictionary key - serialise only", "expected": { "a\u0007a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x08 in dictionary key - serialise only", "expected": { "a\ba": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x09 in dictionary key - serialise only", "expected": { "a\ta": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0a in dictionary key - serialise only", "expected": { "a\na": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0b in dictionary key - serialise only", "expected": { "a\u000ba": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0c in dictionary key - serialise only", "expected": { "a\fa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0d in dictionary key - serialise only", "expected": { "a\ra": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0e in dictionary key - serialise only", "expected": { "a\u000ea": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x0f in dictionary key - serialise only", "expected": { "a\u000fa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x10 in dictionary key - serialise only", "expected": { "a\u0010a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x11 in dictionary key - serialise only", "expected": { "a\u0011a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x12 in dictionary key - serialise only", "expected": { "a\u0012a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x13 in dictionary key - serialise only", "expected": { "a\u0013a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x14 in dictionary key - serialise only", "expected": { "a\u0014a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x15 in dictionary key - serialise only", "expected": { "a\u0015a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x16 in dictionary key - serialise only", "expected": { "a\u0016a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x17 in dictionary key - serialise only", "expected": { "a\u0017a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x18 in dictionary key - serialise only", "expected": { "a\u0018a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x19 in dictionary key - serialise only", "expected": { "a\u0019a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1a in dictionary key - serialise only", "expected": { "a\u001aa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1b in dictionary key - serialise only", "expected": { "a\u001ba": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1c in dictionary key - serialise only", "expected": { "a\u001ca": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1d in dictionary key - serialise only", "expected": { "a\u001da": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1e in dictionary key - serialise only", "expected": { "a\u001ea": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x1f in dictionary key - serialise only", "expected": { "a\u001fa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x20 in dictionary key - serialise only", "expected": { "a a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x21 in dictionary key - serialise only", "expected": { "a!a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x22 in dictionary key - serialise only", "expected": { "a\"a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x23 in dictionary key - serialise only", "expected": { "a#a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x24 in dictionary key - serialise only", "expected": { "a$a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x25 in dictionary key - serialise only", "expected": { "a%a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x26 in dictionary key - serialise only", "expected": { "a&a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x27 in dictionary key - serialise only", "expected": { "a'a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x28 in dictionary key - serialise only", "expected": { "a(a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x29 in dictionary key - serialise only", "expected": { "a)a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x2b in dictionary key - serialise only", "expected": { "a+a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x2c in dictionary key - serialise only", "expected": { "a,a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x2f in dictionary key - serialise only", "expected": { "a/a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x3a in dictionary key - serialise only", "expected": { "a:a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x3b in dictionary key - serialise only", "expected": { "a;a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x3c in dictionary key - serialise only", "expected": { "aa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x3f in dictionary key - serialise only", "expected": { "a?a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x40 in dictionary key - serialise only", "expected": { "a@a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x41 in dictionary key - serialise only", "expected": { "aAa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x42 in dictionary key - serialise only", "expected": { "aBa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x43 in dictionary key - serialise only", "expected": { "aCa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x44 in dictionary key - serialise only", "expected": { "aDa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x45 in dictionary key - serialise only", "expected": { "aEa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x46 in dictionary key - serialise only", "expected": { "aFa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x47 in dictionary key - serialise only", "expected": { "aGa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x48 in dictionary key - serialise only", "expected": { "aHa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x49 in dictionary key - serialise only", "expected": { "aIa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4a in dictionary key - serialise only", "expected": { "aJa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4b in dictionary key - serialise only", "expected": { "aKa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4c in dictionary key - serialise only", "expected": { "aLa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4d in dictionary key - serialise only", "expected": { "aMa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4e in dictionary key - serialise only", "expected": { "aNa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x4f in dictionary key - serialise only", "expected": { "aOa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x50 in dictionary key - serialise only", "expected": { "aPa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x51 in dictionary key - serialise only", "expected": { "aQa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x52 in dictionary key - serialise only", "expected": { "aRa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x53 in dictionary key - serialise only", "expected": { "aSa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x54 in dictionary key - serialise only", "expected": { "aTa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x55 in dictionary key - serialise only", "expected": { "aUa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x56 in dictionary key - serialise only", "expected": { "aVa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x57 in dictionary key - serialise only", "expected": { "aWa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x58 in dictionary key - serialise only", "expected": { "aXa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x59 in dictionary key - serialise only", "expected": { "aYa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x5a in dictionary key - serialise only", "expected": { "aZa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x5b in dictionary key - serialise only", "expected": { "a[a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x5c in dictionary key - serialise only", "expected": { "a\\a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x5d in dictionary key - serialise only", "expected": { "a]a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x5e in dictionary key - serialise only", "expected": { "a^a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x60 in dictionary key - serialise only", "expected": { "a`a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x7b in dictionary key - serialise only", "expected": { "a{a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x7c in dictionary key - serialise only", "expected": { "a|a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x7d in dictionary key - serialise only", "expected": { "a}a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x7e in dictionary key - serialise only", "expected": { "a~a": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x7f in dictionary key - serialise only", "expected": { "a\u007fa": [ 1, {} ] }, "header_type": "dictionary", "must_fail": true }, { "name": "0x00 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0000a": [ 1, {} ] }, "must_fail": true }, { "name": "0x01 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0001a": [ 1, {} ] }, "must_fail": true }, { "name": "0x02 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0002a": [ 1, {} ] }, "must_fail": true }, { "name": "0x03 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0003a": [ 1, {} ] }, "must_fail": true }, { "name": "0x04 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0004a": [ 1, {} ] }, "must_fail": true }, { "name": "0x05 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0005a": [ 1, {} ] }, "must_fail": true }, { "name": "0x06 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0006a": [ 1, {} ] }, "must_fail": true }, { "name": "0x07 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0007a": [ 1, {} ] }, "must_fail": true }, { "name": "0x08 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\ba": [ 1, {} ] }, "must_fail": true }, { "name": "0x09 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\ta": [ 1, {} ] }, "must_fail": true }, { "name": "0x0a starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\na": [ 1, {} ] }, "must_fail": true }, { "name": "0x0b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u000ba": [ 1, {} ] }, "must_fail": true }, { "name": "0x0c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\fa": [ 1, {} ] }, "must_fail": true }, { "name": "0x0d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\ra": [ 1, {} ] }, "must_fail": true }, { "name": "0x0e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u000ea": [ 1, {} ] }, "must_fail": true }, { "name": "0x0f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u000fa": [ 1, {} ] }, "must_fail": true }, { "name": "0x10 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0010a": [ 1, {} ] }, "must_fail": true }, { "name": "0x11 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0011a": [ 1, {} ] }, "must_fail": true }, { "name": "0x12 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0012a": [ 1, {} ] }, "must_fail": true }, { "name": "0x13 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0013a": [ 1, {} ] }, "must_fail": true }, { "name": "0x14 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0014a": [ 1, {} ] }, "must_fail": true }, { "name": "0x15 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0015a": [ 1, {} ] }, "must_fail": true }, { "name": "0x16 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0016a": [ 1, {} ] }, "must_fail": true }, { "name": "0x17 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0017a": [ 1, {} ] }, "must_fail": true }, { "name": "0x18 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0018a": [ 1, {} ] }, "must_fail": true }, { "name": "0x19 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u0019a": [ 1, {} ] }, "must_fail": true }, { "name": "0x1a starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001aa": [ 1, {} ] }, "must_fail": true }, { "name": "0x1b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001ba": [ 1, {} ] }, "must_fail": true }, { "name": "0x1c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001ca": [ 1, {} ] }, "must_fail": true }, { "name": "0x1d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001da": [ 1, {} ] }, "must_fail": true }, { "name": "0x1e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001ea": [ 1, {} ] }, "must_fail": true }, { "name": "0x1f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u001fa": [ 1, {} ] }, "must_fail": true }, { "name": "0x20 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { " a": [ 1, {} ] }, "must_fail": true }, { "name": "0x21 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "!a": [ 1, {} ] }, "must_fail": true }, { "name": "0x22 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\"a": [ 1, {} ] }, "must_fail": true }, { "name": "0x23 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "#a": [ 1, {} ] }, "must_fail": true }, { "name": "0x24 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "$a": [ 1, {} ] }, "must_fail": true }, { "name": "0x25 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "%a": [ 1, {} ] }, "must_fail": true }, { "name": "0x26 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "&a": [ 1, {} ] }, "must_fail": true }, { "name": "0x27 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "'a": [ 1, {} ] }, "must_fail": true }, { "name": "0x28 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "(a": [ 1, {} ] }, "must_fail": true }, { "name": "0x29 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { ")a": [ 1, {} ] }, "must_fail": true }, { "name": "0x2b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "+a": [ 1, {} ] }, "must_fail": true }, { "name": "0x2c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { ",a": [ 1, {} ] }, "must_fail": true }, { "name": "0x2d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "-a": [ 1, {} ] }, "must_fail": true }, { "name": "0x2e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { ".a": [ 1, {} ] }, "must_fail": true }, { "name": "0x2f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "/a": [ 1, {} ] }, "must_fail": true }, { "name": "0x30 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "0a": [ 1, {} ] }, "must_fail": true }, { "name": "0x31 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "1a": [ 1, {} ] }, "must_fail": true }, { "name": "0x32 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "2a": [ 1, {} ] }, "must_fail": true }, { "name": "0x33 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "3a": [ 1, {} ] }, "must_fail": true }, { "name": "0x34 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "4a": [ 1, {} ] }, "must_fail": true }, { "name": "0x35 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "5a": [ 1, {} ] }, "must_fail": true }, { "name": "0x36 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "6a": [ 1, {} ] }, "must_fail": true }, { "name": "0x37 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "7a": [ 1, {} ] }, "must_fail": true }, { "name": "0x38 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "8a": [ 1, {} ] }, "must_fail": true }, { "name": "0x39 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "9a": [ 1, {} ] }, "must_fail": true }, { "name": "0x3a starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { ":a": [ 1, {} ] }, "must_fail": true }, { "name": "0x3b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { ";a": [ 1, {} ] }, "must_fail": true }, { "name": "0x3c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "a": [ 1, {} ] }, "must_fail": true }, { "name": "0x3f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "?a": [ 1, {} ] }, "must_fail": true }, { "name": "0x40 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "@a": [ 1, {} ] }, "must_fail": true }, { "name": "0x41 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Aa": [ 1, {} ] }, "must_fail": true }, { "name": "0x42 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ba": [ 1, {} ] }, "must_fail": true }, { "name": "0x43 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ca": [ 1, {} ] }, "must_fail": true }, { "name": "0x44 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Da": [ 1, {} ] }, "must_fail": true }, { "name": "0x45 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ea": [ 1, {} ] }, "must_fail": true }, { "name": "0x46 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Fa": [ 1, {} ] }, "must_fail": true }, { "name": "0x47 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ga": [ 1, {} ] }, "must_fail": true }, { "name": "0x48 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ha": [ 1, {} ] }, "must_fail": true }, { "name": "0x49 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ia": [ 1, {} ] }, "must_fail": true }, { "name": "0x4a starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ja": [ 1, {} ] }, "must_fail": true }, { "name": "0x4b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ka": [ 1, {} ] }, "must_fail": true }, { "name": "0x4c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "La": [ 1, {} ] }, "must_fail": true }, { "name": "0x4d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ma": [ 1, {} ] }, "must_fail": true }, { "name": "0x4e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Na": [ 1, {} ] }, "must_fail": true }, { "name": "0x4f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Oa": [ 1, {} ] }, "must_fail": true }, { "name": "0x50 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Pa": [ 1, {} ] }, "must_fail": true }, { "name": "0x51 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Qa": [ 1, {} ] }, "must_fail": true }, { "name": "0x52 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ra": [ 1, {} ] }, "must_fail": true }, { "name": "0x53 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Sa": [ 1, {} ] }, "must_fail": true }, { "name": "0x54 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ta": [ 1, {} ] }, "must_fail": true }, { "name": "0x55 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ua": [ 1, {} ] }, "must_fail": true }, { "name": "0x56 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Va": [ 1, {} ] }, "must_fail": true }, { "name": "0x57 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Wa": [ 1, {} ] }, "must_fail": true }, { "name": "0x58 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Xa": [ 1, {} ] }, "must_fail": true }, { "name": "0x59 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Ya": [ 1, {} ] }, "must_fail": true }, { "name": "0x5a starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "Za": [ 1, {} ] }, "must_fail": true }, { "name": "0x5b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "[a": [ 1, {} ] }, "must_fail": true }, { "name": "0x5c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\\a": [ 1, {} ] }, "must_fail": true }, { "name": "0x5d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "]a": [ 1, {} ] }, "must_fail": true }, { "name": "0x5e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "^a": [ 1, {} ] }, "must_fail": true }, { "name": "0x5f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "_a": [ 1, {} ] }, "must_fail": true }, { "name": "0x60 starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "`a": [ 1, {} ] }, "must_fail": true }, { "name": "0x7b starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "{a": [ 1, {} ] }, "must_fail": true }, { "name": "0x7c starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "|a": [ 1, {} ] }, "must_fail": true }, { "name": "0x7d starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "}a": [ 1, {} ] }, "must_fail": true }, { "name": "0x7e starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "~a": [ 1, {} ] }, "must_fail": true }, { "name": "0x7f starting an dictionary key - serialise only", "header_type": "dictionary", "expected": { "\u007fa": [ 1, {} ] }, "must_fail": true }, { "name": "0x00 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0000a": 1 } ] ], "must_fail": true }, { "name": "0x01 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0001a": 1 } ] ], "must_fail": true }, { "name": "0x02 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0002a": 1 } ] ], "must_fail": true }, { "name": "0x03 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0003a": 1 } ] ], "must_fail": true }, { "name": "0x04 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0004a": 1 } ] ], "must_fail": true }, { "name": "0x05 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0005a": 1 } ] ], "must_fail": true }, { "name": "0x06 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0006a": 1 } ] ], "must_fail": true }, { "name": "0x07 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0007a": 1 } ] ], "must_fail": true }, { "name": "0x08 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\ba": 1 } ] ], "must_fail": true }, { "name": "0x09 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\ta": 1 } ] ], "must_fail": true }, { "name": "0x0a in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\na": 1 } ] ], "must_fail": true }, { "name": "0x0b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u000ba": 1 } ] ], "must_fail": true }, { "name": "0x0c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\fa": 1 } ] ], "must_fail": true }, { "name": "0x0d in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\ra": 1 } ] ], "must_fail": true }, { "name": "0x0e in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u000ea": 1 } ] ], "must_fail": true }, { "name": "0x0f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u000fa": 1 } ] ], "must_fail": true }, { "name": "0x10 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0010a": 1 } ] ], "must_fail": true }, { "name": "0x11 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0011a": 1 } ] ], "must_fail": true }, { "name": "0x12 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0012a": 1 } ] ], "must_fail": true }, { "name": "0x13 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0013a": 1 } ] ], "must_fail": true }, { "name": "0x14 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0014a": 1 } ] ], "must_fail": true }, { "name": "0x15 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0015a": 1 } ] ], "must_fail": true }, { "name": "0x16 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0016a": 1 } ] ], "must_fail": true }, { "name": "0x17 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0017a": 1 } ] ], "must_fail": true }, { "name": "0x18 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0018a": 1 } ] ], "must_fail": true }, { "name": "0x19 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u0019a": 1 } ] ], "must_fail": true }, { "name": "0x1a in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001aa": 1 } ] ], "must_fail": true }, { "name": "0x1b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001ba": 1 } ] ], "must_fail": true }, { "name": "0x1c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001ca": 1 } ] ], "must_fail": true }, { "name": "0x1d in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001da": 1 } ] ], "must_fail": true }, { "name": "0x1e in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001ea": 1 } ] ], "must_fail": true }, { "name": "0x1f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u001fa": 1 } ] ], "must_fail": true }, { "name": "0x20 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a a": 1 } ] ], "must_fail": true }, { "name": "0x21 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a!a": 1 } ] ], "must_fail": true }, { "name": "0x22 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\"a": 1 } ] ], "must_fail": true }, { "name": "0x23 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a#a": 1 } ] ], "must_fail": true }, { "name": "0x24 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a$a": 1 } ] ], "must_fail": true }, { "name": "0x25 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a%a": 1 } ] ], "must_fail": true }, { "name": "0x26 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a&a": 1 } ] ], "must_fail": true }, { "name": "0x27 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a'a": 1 } ] ], "must_fail": true }, { "name": "0x28 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a(a": 1 } ] ], "must_fail": true }, { "name": "0x29 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a)a": 1 } ] ], "must_fail": true }, { "name": "0x2b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a+a": 1 } ] ], "must_fail": true }, { "name": "0x2c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a,a": 1 } ] ], "must_fail": true }, { "name": "0x2f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a/a": 1 } ] ], "must_fail": true }, { "name": "0x3a in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a:a": 1 } ] ], "must_fail": true }, { "name": "0x3b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a;a": 1 } ] ], "must_fail": true }, { "name": "0x3c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aa": 1 } ] ], "must_fail": true }, { "name": "0x3f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a?a": 1 } ] ], "must_fail": true }, { "name": "0x40 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a@a": 1 } ] ], "must_fail": true }, { "name": "0x41 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aAa": 1 } ] ], "must_fail": true }, { "name": "0x42 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aBa": 1 } ] ], "must_fail": true }, { "name": "0x43 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aCa": 1 } ] ], "must_fail": true }, { "name": "0x44 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aDa": 1 } ] ], "must_fail": true }, { "name": "0x45 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aEa": 1 } ] ], "must_fail": true }, { "name": "0x46 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aFa": 1 } ] ], "must_fail": true }, { "name": "0x47 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aGa": 1 } ] ], "must_fail": true }, { "name": "0x48 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aHa": 1 } ] ], "must_fail": true }, { "name": "0x49 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aIa": 1 } ] ], "must_fail": true }, { "name": "0x4a in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aJa": 1 } ] ], "must_fail": true }, { "name": "0x4b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aKa": 1 } ] ], "must_fail": true }, { "name": "0x4c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aLa": 1 } ] ], "must_fail": true }, { "name": "0x4d in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aMa": 1 } ] ], "must_fail": true }, { "name": "0x4e in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aNa": 1 } ] ], "must_fail": true }, { "name": "0x4f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aOa": 1 } ] ], "must_fail": true }, { "name": "0x50 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aPa": 1 } ] ], "must_fail": true }, { "name": "0x51 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aQa": 1 } ] ], "must_fail": true }, { "name": "0x52 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aRa": 1 } ] ], "must_fail": true }, { "name": "0x53 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aSa": 1 } ] ], "must_fail": true }, { "name": "0x54 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aTa": 1 } ] ], "must_fail": true }, { "name": "0x55 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aUa": 1 } ] ], "must_fail": true }, { "name": "0x56 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aVa": 1 } ] ], "must_fail": true }, { "name": "0x57 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aWa": 1 } ] ], "must_fail": true }, { "name": "0x58 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aXa": 1 } ] ], "must_fail": true }, { "name": "0x59 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aYa": 1 } ] ], "must_fail": true }, { "name": "0x5a in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "aZa": 1 } ] ], "must_fail": true }, { "name": "0x5b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a[a": 1 } ] ], "must_fail": true }, { "name": "0x5c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\\a": 1 } ] ], "must_fail": true }, { "name": "0x5d in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a]a": 1 } ] ], "must_fail": true }, { "name": "0x5e in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a^a": 1 } ] ], "must_fail": true }, { "name": "0x60 in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a`a": 1 } ] ], "must_fail": true }, { "name": "0x7b in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a{a": 1 } ] ], "must_fail": true }, { "name": "0x7c in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a|a": 1 } ] ], "must_fail": true }, { "name": "0x7d in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a}a": 1 } ] ], "must_fail": true }, { "name": "0x7e in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a~a": 1 } ] ], "must_fail": true }, { "name": "0x7f in parameterised list key - serialise only", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a\u007fa": 1 } ] ], "must_fail": true }, { "name": "0x00 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0000a": 1 } ] ], "must_fail": true }, { "name": "0x01 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0001a": 1 } ] ], "must_fail": true }, { "name": "0x02 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0002a": 1 } ] ], "must_fail": true }, { "name": "0x03 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0003a": 1 } ] ], "must_fail": true }, { "name": "0x04 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0004a": 1 } ] ], "must_fail": true }, { "name": "0x05 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0005a": 1 } ] ], "must_fail": true }, { "name": "0x06 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0006a": 1 } ] ], "must_fail": true }, { "name": "0x07 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0007a": 1 } ] ], "must_fail": true }, { "name": "0x08 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\ba": 1 } ] ], "must_fail": true }, { "name": "0x09 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\ta": 1 } ] ], "must_fail": true }, { "name": "0x0a starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\na": 1 } ] ], "must_fail": true }, { "name": "0x0b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u000ba": 1 } ] ], "must_fail": true }, { "name": "0x0c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\fa": 1 } ] ], "must_fail": true }, { "name": "0x0d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\ra": 1 } ] ], "must_fail": true }, { "name": "0x0e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u000ea": 1 } ] ], "must_fail": true }, { "name": "0x0f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u000fa": 1 } ] ], "must_fail": true }, { "name": "0x10 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0010a": 1 } ] ], "must_fail": true }, { "name": "0x11 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0011a": 1 } ] ], "must_fail": true }, { "name": "0x12 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0012a": 1 } ] ], "must_fail": true }, { "name": "0x13 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0013a": 1 } ] ], "must_fail": true }, { "name": "0x14 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0014a": 1 } ] ], "must_fail": true }, { "name": "0x15 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0015a": 1 } ] ], "must_fail": true }, { "name": "0x16 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0016a": 1 } ] ], "must_fail": true }, { "name": "0x17 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0017a": 1 } ] ], "must_fail": true }, { "name": "0x18 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0018a": 1 } ] ], "must_fail": true }, { "name": "0x19 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u0019a": 1 } ] ], "must_fail": true }, { "name": "0x1a starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001aa": 1 } ] ], "must_fail": true }, { "name": "0x1b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001ba": 1 } ] ], "must_fail": true }, { "name": "0x1c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001ca": 1 } ] ], "must_fail": true }, { "name": "0x1d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001da": 1 } ] ], "must_fail": true }, { "name": "0x1e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001ea": 1 } ] ], "must_fail": true }, { "name": "0x1f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u001fa": 1 } ] ], "must_fail": true }, { "name": "0x20 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { " a": 1 } ] ], "must_fail": true }, { "name": "0x21 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "!a": 1 } ] ], "must_fail": true }, { "name": "0x22 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\"a": 1 } ] ], "must_fail": true }, { "name": "0x23 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "#a": 1 } ] ], "must_fail": true }, { "name": "0x24 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "$a": 1 } ] ], "must_fail": true }, { "name": "0x25 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "%a": 1 } ] ], "must_fail": true }, { "name": "0x26 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "&a": 1 } ] ], "must_fail": true }, { "name": "0x27 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "'a": 1 } ] ], "must_fail": true }, { "name": "0x28 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "(a": 1 } ] ], "must_fail": true }, { "name": "0x29 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { ")a": 1 } ] ], "must_fail": true }, { "name": "0x2b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "+a": 1 } ] ], "must_fail": true }, { "name": "0x2c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { ",a": 1 } ] ], "must_fail": true }, { "name": "0x2d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "-a": 1 } ] ], "must_fail": true }, { "name": "0x2e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { ".a": 1 } ] ], "must_fail": true }, { "name": "0x2f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "/a": 1 } ] ], "must_fail": true }, { "name": "0x30 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "0a": 1 } ] ], "must_fail": true }, { "name": "0x31 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "1a": 1 } ] ], "must_fail": true }, { "name": "0x32 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "2a": 1 } ] ], "must_fail": true }, { "name": "0x33 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "3a": 1 } ] ], "must_fail": true }, { "name": "0x34 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "4a": 1 } ] ], "must_fail": true }, { "name": "0x35 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "5a": 1 } ] ], "must_fail": true }, { "name": "0x36 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "6a": 1 } ] ], "must_fail": true }, { "name": "0x37 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "7a": 1 } ] ], "must_fail": true }, { "name": "0x38 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "8a": 1 } ] ], "must_fail": true }, { "name": "0x39 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "9a": 1 } ] ], "must_fail": true }, { "name": "0x3a starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { ":a": 1 } ] ], "must_fail": true }, { "name": "0x3b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { ";a": 1 } ] ], "must_fail": true }, { "name": "0x3c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "a": 1 } ] ], "must_fail": true }, { "name": "0x3f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "?a": 1 } ] ], "must_fail": true }, { "name": "0x40 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "@a": 1 } ] ], "must_fail": true }, { "name": "0x41 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Aa": 1 } ] ], "must_fail": true }, { "name": "0x42 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ba": 1 } ] ], "must_fail": true }, { "name": "0x43 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ca": 1 } ] ], "must_fail": true }, { "name": "0x44 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Da": 1 } ] ], "must_fail": true }, { "name": "0x45 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ea": 1 } ] ], "must_fail": true }, { "name": "0x46 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Fa": 1 } ] ], "must_fail": true }, { "name": "0x47 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ga": 1 } ] ], "must_fail": true }, { "name": "0x48 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ha": 1 } ] ], "must_fail": true }, { "name": "0x49 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ia": 1 } ] ], "must_fail": true }, { "name": "0x4a starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ja": 1 } ] ], "must_fail": true }, { "name": "0x4b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ka": 1 } ] ], "must_fail": true }, { "name": "0x4c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "La": 1 } ] ], "must_fail": true }, { "name": "0x4d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ma": 1 } ] ], "must_fail": true }, { "name": "0x4e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Na": 1 } ] ], "must_fail": true }, { "name": "0x4f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Oa": 1 } ] ], "must_fail": true }, { "name": "0x50 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Pa": 1 } ] ], "must_fail": true }, { "name": "0x51 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Qa": 1 } ] ], "must_fail": true }, { "name": "0x52 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ra": 1 } ] ], "must_fail": true }, { "name": "0x53 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Sa": 1 } ] ], "must_fail": true }, { "name": "0x54 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ta": 1 } ] ], "must_fail": true }, { "name": "0x55 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ua": 1 } ] ], "must_fail": true }, { "name": "0x56 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Va": 1 } ] ], "must_fail": true }, { "name": "0x57 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Wa": 1 } ] ], "must_fail": true }, { "name": "0x58 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Xa": 1 } ] ], "must_fail": true }, { "name": "0x59 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Ya": 1 } ] ], "must_fail": true }, { "name": "0x5a starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "Za": 1 } ] ], "must_fail": true }, { "name": "0x5b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "[a": 1 } ] ], "must_fail": true }, { "name": "0x5c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\\a": 1 } ] ], "must_fail": true }, { "name": "0x5d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "]a": 1 } ] ], "must_fail": true }, { "name": "0x5e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "^a": 1 } ] ], "must_fail": true }, { "name": "0x5f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "_a": 1 } ] ], "must_fail": true }, { "name": "0x60 starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "`a": 1 } ] ], "must_fail": true }, { "name": "0x7b starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "{a": 1 } ] ], "must_fail": true }, { "name": "0x7c starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "|a": 1 } ] ], "must_fail": true }, { "name": "0x7d starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "}a": 1 } ] ], "must_fail": true }, { "name": "0x7e starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "~a": 1 } ] ], "must_fail": true }, { "name": "0x7f starting a parameterised list key", "header_type": "list", "expected": [ [ { "__type": "token", "value": "foo" }, { "\u007fa": 1 } ] ], "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/serialisation-tests/number.json ================================================ [ { "name": "too big postive integer - serialize", "header_type": "item", "expected": [1000000000000000, {}], "must_fail": true }, { "name": "too big negative integer - serialize", "header_type": "item", "expected": [-1000000000000000, {}], "must_fail": true }, { "name": "too big postive decimal - serialize", "header_type": "item", "expected": [1000000000000.1, {}], "must_fail": true }, { "name": "too big negative decimal - serialize", "header_type": "item", "expected": [-1000000000000.1, {}], "must_fail": true }, { "name": "round positive odd decimal - serialize", "header_type": "item", "expected": [0.0015, {}], "canonical": ["0.002"] }, { "name": "round positive even decimal - serialize", "header_type": "item", "expected": [0.0025, {}], "canonical": ["0.002"] }, { "name": "round negative odd decimal - serialize", "header_type": "item", "expected": [-0.0015, {}], "canonical": ["-0.002"] }, { "name": "round negative even decimal - serialize", "header_type": "item", "expected": [-0.0025, {}], "canonical": ["-0.002"] }, { "name": "decimal round up to integer part - serialize", "header_type": "item", "expected": [9.9995, {}], "canonical": ["10.0"] } ] ================================================ FILE: Tests/TestFixtures/serialisation-tests/string-generated.json ================================================ [ { "name": "0x00 in string - serialise only", "expected": [ "\u0000", {} ], "header_type": "item", "must_fail": true }, { "name": "0x01 in string - serialise only", "expected": [ "\u0001", {} ], "header_type": "item", "must_fail": true }, { "name": "0x02 in string - serialise only", "expected": [ "\u0002", {} ], "header_type": "item", "must_fail": true }, { "name": "0x03 in string - serialise only", "expected": [ "\u0003", {} ], "header_type": "item", "must_fail": true }, { "name": "0x04 in string - serialise only", "expected": [ "\u0004", {} ], "header_type": "item", "must_fail": true }, { "name": "0x05 in string - serialise only", "expected": [ "\u0005", {} ], "header_type": "item", "must_fail": true }, { "name": "0x06 in string - serialise only", "expected": [ "\u0006", {} ], "header_type": "item", "must_fail": true }, { "name": "0x07 in string - serialise only", "expected": [ "\u0007", {} ], "header_type": "item", "must_fail": true }, { "name": "0x08 in string - serialise only", "expected": [ "\b", {} ], "header_type": "item", "must_fail": true }, { "name": "0x09 in string - serialise only", "expected": [ "\t", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0a in string - serialise only", "expected": [ "\n", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0b in string - serialise only", "expected": [ "\u000b", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0c in string - serialise only", "expected": [ "\f", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0d in string - serialise only", "expected": [ "\r", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0e in string - serialise only", "expected": [ "\u000e", {} ], "header_type": "item", "must_fail": true }, { "name": "0x0f in string - serialise only", "expected": [ "\u000f", {} ], "header_type": "item", "must_fail": true }, { "name": "0x10 in string - serialise only", "expected": [ "\u0010", {} ], "header_type": "item", "must_fail": true }, { "name": "0x11 in string - serialise only", "expected": [ "\u0011", {} ], "header_type": "item", "must_fail": true }, { "name": "0x12 in string - serialise only", "expected": [ "\u0012", {} ], "header_type": "item", "must_fail": true }, { "name": "0x13 in string - serialise only", "expected": [ "\u0013", {} ], "header_type": "item", "must_fail": true }, { "name": "0x14 in string - serialise only", "expected": [ "\u0014", {} ], "header_type": "item", "must_fail": true }, { "name": "0x15 in string - serialise only", "expected": [ "\u0015", {} ], "header_type": "item", "must_fail": true }, { "name": "0x16 in string - serialise only", "expected": [ "\u0016", {} ], "header_type": "item", "must_fail": true }, { "name": "0x17 in string - serialise only", "expected": [ "\u0017", {} ], "header_type": "item", "must_fail": true }, { "name": "0x18 in string - serialise only", "expected": [ "\u0018", {} ], "header_type": "item", "must_fail": true }, { "name": "0x19 in string - serialise only", "expected": [ "\u0019", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1a in string - serialise only", "expected": [ "\u001a", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1b in string - serialise only", "expected": [ "\u001b", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1c in string - serialise only", "expected": [ "\u001c", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1d in string - serialise only", "expected": [ "\u001d", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1e in string - serialise only", "expected": [ "\u001e", {} ], "header_type": "item", "must_fail": true }, { "name": "0x1f in string - serialise only", "expected": [ "\u001f", {} ], "header_type": "item", "must_fail": true }, { "name": "0x7f in string - serialise only", "expected": [ "\u007f", {} ], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/serialisation-tests/token-generated.json ================================================ [ { "name": "0x00 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0000a" }, {} ], "must_fail": true }, { "name": "0x01 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0001a" }, {} ], "must_fail": true }, { "name": "0x02 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0002a" }, {} ], "must_fail": true }, { "name": "0x03 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0003a" }, {} ], "must_fail": true }, { "name": "0x04 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0004a" }, {} ], "must_fail": true }, { "name": "0x05 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0005a" }, {} ], "must_fail": true }, { "name": "0x06 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0006a" }, {} ], "must_fail": true }, { "name": "0x07 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0007a" }, {} ], "must_fail": true }, { "name": "0x08 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\ba" }, {} ], "must_fail": true }, { "name": "0x09 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\ta" }, {} ], "must_fail": true }, { "name": "0x0a in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\na" }, {} ], "must_fail": true }, { "name": "0x0b in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u000ba" }, {} ], "must_fail": true }, { "name": "0x0c in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\fa" }, {} ], "must_fail": true }, { "name": "0x0d in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\ra" }, {} ], "must_fail": true }, { "name": "0x0e in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u000ea" }, {} ], "must_fail": true }, { "name": "0x0f in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u000fa" }, {} ], "must_fail": true }, { "name": "0x10 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0010a" }, {} ], "must_fail": true }, { "name": "0x11 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0011a" }, {} ], "must_fail": true }, { "name": "0x12 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0012a" }, {} ], "must_fail": true }, { "name": "0x13 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0013a" }, {} ], "must_fail": true }, { "name": "0x14 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0014a" }, {} ], "must_fail": true }, { "name": "0x15 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0015a" }, {} ], "must_fail": true }, { "name": "0x16 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0016a" }, {} ], "must_fail": true }, { "name": "0x17 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0017a" }, {} ], "must_fail": true }, { "name": "0x18 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0018a" }, {} ], "must_fail": true }, { "name": "0x19 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u0019a" }, {} ], "must_fail": true }, { "name": "0x1a in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001aa" }, {} ], "must_fail": true }, { "name": "0x1b in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001ba" }, {} ], "must_fail": true }, { "name": "0x1c in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001ca" }, {} ], "must_fail": true }, { "name": "0x1d in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001da" }, {} ], "must_fail": true }, { "name": "0x1e in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001ea" }, {} ], "must_fail": true }, { "name": "0x1f in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u001fa" }, {} ], "must_fail": true }, { "name": "0x20 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a a" }, {} ], "must_fail": true }, { "name": "0x22 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\"a" }, {} ], "must_fail": true }, { "name": "0x28 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a(a" }, {} ], "must_fail": true }, { "name": "0x29 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a)a" }, {} ], "must_fail": true }, { "name": "0x2c in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a,a" }, {} ], "must_fail": true }, { "name": "0x3b in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a;a" }, {} ], "must_fail": true }, { "name": "0x3c in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "aa" }, {} ], "must_fail": true }, { "name": "0x3f in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a?a" }, {} ], "must_fail": true }, { "name": "0x40 in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a@a" }, {} ], "must_fail": true }, { "name": "0x5b in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a[a" }, {} ], "must_fail": true }, { "name": "0x5c in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\\a" }, {} ], "must_fail": true }, { "name": "0x5d in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a]a" }, {} ], "must_fail": true }, { "name": "0x7b in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a{a" }, {} ], "must_fail": true }, { "name": "0x7d in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a}a" }, {} ], "must_fail": true }, { "name": "0x7f in token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a\u007fa" }, {} ], "must_fail": true }, { "name": "0x00 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0000a" }, {} ], "must_fail": true }, { "name": "0x01 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0001a" }, {} ], "must_fail": true }, { "name": "0x02 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0002a" }, {} ], "must_fail": true }, { "name": "0x03 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0003a" }, {} ], "must_fail": true }, { "name": "0x04 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0004a" }, {} ], "must_fail": true }, { "name": "0x05 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0005a" }, {} ], "must_fail": true }, { "name": "0x06 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0006a" }, {} ], "must_fail": true }, { "name": "0x07 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0007a" }, {} ], "must_fail": true }, { "name": "0x08 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\ba" }, {} ], "must_fail": true }, { "name": "0x09 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\ta" }, {} ], "must_fail": true }, { "name": "0x0a starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\na" }, {} ], "must_fail": true }, { "name": "0x0b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u000ba" }, {} ], "must_fail": true }, { "name": "0x0c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\fa" }, {} ], "must_fail": true }, { "name": "0x0d starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\ra" }, {} ], "must_fail": true }, { "name": "0x0e starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u000ea" }, {} ], "must_fail": true }, { "name": "0x0f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u000fa" }, {} ], "must_fail": true }, { "name": "0x10 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0010a" }, {} ], "must_fail": true }, { "name": "0x11 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0011a" }, {} ], "must_fail": true }, { "name": "0x12 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0012a" }, {} ], "must_fail": true }, { "name": "0x13 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0013a" }, {} ], "must_fail": true }, { "name": "0x14 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0014a" }, {} ], "must_fail": true }, { "name": "0x15 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0015a" }, {} ], "must_fail": true }, { "name": "0x16 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0016a" }, {} ], "must_fail": true }, { "name": "0x17 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0017a" }, {} ], "must_fail": true }, { "name": "0x18 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0018a" }, {} ], "must_fail": true }, { "name": "0x19 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u0019a" }, {} ], "must_fail": true }, { "name": "0x1a starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001aa" }, {} ], "must_fail": true }, { "name": "0x1b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001ba" }, {} ], "must_fail": true }, { "name": "0x1c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001ca" }, {} ], "must_fail": true }, { "name": "0x1d starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001da" }, {} ], "must_fail": true }, { "name": "0x1e starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001ea" }, {} ], "must_fail": true }, { "name": "0x1f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u001fa" }, {} ], "must_fail": true }, { "name": "0x20 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": " a" }, {} ], "must_fail": true }, { "name": "0x21 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "!a" }, {} ], "must_fail": true }, { "name": "0x22 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\"a" }, {} ], "must_fail": true }, { "name": "0x23 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "#a" }, {} ], "must_fail": true }, { "name": "0x24 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "$a" }, {} ], "must_fail": true }, { "name": "0x25 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "%a" }, {} ], "must_fail": true }, { "name": "0x26 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "&a" }, {} ], "must_fail": true }, { "name": "0x27 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "'a" }, {} ], "must_fail": true }, { "name": "0x28 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "(a" }, {} ], "must_fail": true }, { "name": "0x29 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": ")a" }, {} ], "must_fail": true }, { "name": "0x2b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "+a" }, {} ], "must_fail": true }, { "name": "0x2c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": ",a" }, {} ], "must_fail": true }, { "name": "0x2d starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "-a" }, {} ], "must_fail": true }, { "name": "0x2e starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": ".a" }, {} ], "must_fail": true }, { "name": "0x2f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "/a" }, {} ], "must_fail": true }, { "name": "0x30 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "0a" }, {} ], "must_fail": true }, { "name": "0x31 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "1a" }, {} ], "must_fail": true }, { "name": "0x32 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "2a" }, {} ], "must_fail": true }, { "name": "0x33 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "3a" }, {} ], "must_fail": true }, { "name": "0x34 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "4a" }, {} ], "must_fail": true }, { "name": "0x35 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "5a" }, {} ], "must_fail": true }, { "name": "0x36 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "6a" }, {} ], "must_fail": true }, { "name": "0x37 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "7a" }, {} ], "must_fail": true }, { "name": "0x38 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "8a" }, {} ], "must_fail": true }, { "name": "0x39 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "9a" }, {} ], "must_fail": true }, { "name": "0x3a starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": ":a" }, {} ], "must_fail": true }, { "name": "0x3b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": ";a" }, {} ], "must_fail": true }, { "name": "0x3c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "a" }, {} ], "must_fail": true }, { "name": "0x3f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "?a" }, {} ], "must_fail": true }, { "name": "0x40 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "@a" }, {} ], "must_fail": true }, { "name": "0x5b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "[a" }, {} ], "must_fail": true }, { "name": "0x5c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\\a" }, {} ], "must_fail": true }, { "name": "0x5d starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "]a" }, {} ], "must_fail": true }, { "name": "0x5e starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "^a" }, {} ], "must_fail": true }, { "name": "0x5f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "_a" }, {} ], "must_fail": true }, { "name": "0x60 starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "`a" }, {} ], "must_fail": true }, { "name": "0x7b starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "{a" }, {} ], "must_fail": true }, { "name": "0x7c starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "|a" }, {} ], "must_fail": true }, { "name": "0x7d starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "}a" }, {} ], "must_fail": true }, { "name": "0x7e starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "~a" }, {} ], "must_fail": true }, { "name": "0x7f starting a token - serialise only", "header_type": "item", "expected": [ { "__type": "token", "value": "\u007fa" }, {} ], "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/string-generated.json ================================================ [ { "name": "0x00 in string", "raw": [ "\" \u0000 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x01 in string", "raw": [ "\" \u0001 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x02 in string", "raw": [ "\" \u0002 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x03 in string", "raw": [ "\" \u0003 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x04 in string", "raw": [ "\" \u0004 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x05 in string", "raw": [ "\" \u0005 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x06 in string", "raw": [ "\" \u0006 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x07 in string", "raw": [ "\" \u0007 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x08 in string", "raw": [ "\" \b \"" ], "header_type": "item", "must_fail": true }, { "name": "0x09 in string", "raw": [ "\" \t \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0a in string", "raw": [ "\" \n \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0b in string", "raw": [ "\" \u000b \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0c in string", "raw": [ "\" \f \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0d in string", "raw": [ "\" \r \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0e in string", "raw": [ "\" \u000e \"" ], "header_type": "item", "must_fail": true }, { "name": "0x0f in string", "raw": [ "\" \u000f \"" ], "header_type": "item", "must_fail": true }, { "name": "0x10 in string", "raw": [ "\" \u0010 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x11 in string", "raw": [ "\" \u0011 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x12 in string", "raw": [ "\" \u0012 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x13 in string", "raw": [ "\" \u0013 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x14 in string", "raw": [ "\" \u0014 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x15 in string", "raw": [ "\" \u0015 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x16 in string", "raw": [ "\" \u0016 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x17 in string", "raw": [ "\" \u0017 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x18 in string", "raw": [ "\" \u0018 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x19 in string", "raw": [ "\" \u0019 \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1a in string", "raw": [ "\" \u001a \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1b in string", "raw": [ "\" \u001b \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1c in string", "raw": [ "\" \u001c \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1d in string", "raw": [ "\" \u001d \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1e in string", "raw": [ "\" \u001e \"" ], "header_type": "item", "must_fail": true }, { "name": "0x1f in string", "raw": [ "\" \u001f \"" ], "header_type": "item", "must_fail": true }, { "name": "0x20 in string", "raw": [ "\" \"" ], "header_type": "item", "expected": [ " ", {} ] }, { "name": "0x21 in string", "raw": [ "\" ! \"" ], "header_type": "item", "expected": [ " ! ", {} ] }, { "name": "0x22 in string", "raw": [ "\" \" \"" ], "header_type": "item", "must_fail": true }, { "name": "0x23 in string", "raw": [ "\" # \"" ], "header_type": "item", "expected": [ " # ", {} ] }, { "name": "0x24 in string", "raw": [ "\" $ \"" ], "header_type": "item", "expected": [ " $ ", {} ] }, { "name": "0x25 in string", "raw": [ "\" % \"" ], "header_type": "item", "expected": [ " % ", {} ] }, { "name": "0x26 in string", "raw": [ "\" & \"" ], "header_type": "item", "expected": [ " & ", {} ] }, { "name": "0x27 in string", "raw": [ "\" ' \"" ], "header_type": "item", "expected": [ " ' ", {} ] }, { "name": "0x28 in string", "raw": [ "\" ( \"" ], "header_type": "item", "expected": [ " ( ", {} ] }, { "name": "0x29 in string", "raw": [ "\" ) \"" ], "header_type": "item", "expected": [ " ) ", {} ] }, { "name": "0x2a in string", "raw": [ "\" * \"" ], "header_type": "item", "expected": [ " * ", {} ] }, { "name": "0x2b in string", "raw": [ "\" + \"" ], "header_type": "item", "expected": [ " + ", {} ] }, { "name": "0x2c in string", "raw": [ "\" , \"" ], "header_type": "item", "expected": [ " , ", {} ] }, { "name": "0x2d in string", "raw": [ "\" - \"" ], "header_type": "item", "expected": [ " - ", {} ] }, { "name": "0x2e in string", "raw": [ "\" . \"" ], "header_type": "item", "expected": [ " . ", {} ] }, { "name": "0x2f in string", "raw": [ "\" / \"" ], "header_type": "item", "expected": [ " / ", {} ] }, { "name": "0x30 in string", "raw": [ "\" 0 \"" ], "header_type": "item", "expected": [ " 0 ", {} ] }, { "name": "0x31 in string", "raw": [ "\" 1 \"" ], "header_type": "item", "expected": [ " 1 ", {} ] }, { "name": "0x32 in string", "raw": [ "\" 2 \"" ], "header_type": "item", "expected": [ " 2 ", {} ] }, { "name": "0x33 in string", "raw": [ "\" 3 \"" ], "header_type": "item", "expected": [ " 3 ", {} ] }, { "name": "0x34 in string", "raw": [ "\" 4 \"" ], "header_type": "item", "expected": [ " 4 ", {} ] }, { "name": "0x35 in string", "raw": [ "\" 5 \"" ], "header_type": "item", "expected": [ " 5 ", {} ] }, { "name": "0x36 in string", "raw": [ "\" 6 \"" ], "header_type": "item", "expected": [ " 6 ", {} ] }, { "name": "0x37 in string", "raw": [ "\" 7 \"" ], "header_type": "item", "expected": [ " 7 ", {} ] }, { "name": "0x38 in string", "raw": [ "\" 8 \"" ], "header_type": "item", "expected": [ " 8 ", {} ] }, { "name": "0x39 in string", "raw": [ "\" 9 \"" ], "header_type": "item", "expected": [ " 9 ", {} ] }, { "name": "0x3a in string", "raw": [ "\" : \"" ], "header_type": "item", "expected": [ " : ", {} ] }, { "name": "0x3b in string", "raw": [ "\" ; \"" ], "header_type": "item", "expected": [ " ; ", {} ] }, { "name": "0x3c in string", "raw": [ "\" < \"" ], "header_type": "item", "expected": [ " < ", {} ] }, { "name": "0x3d in string", "raw": [ "\" = \"" ], "header_type": "item", "expected": [ " = ", {} ] }, { "name": "0x3e in string", "raw": [ "\" > \"" ], "header_type": "item", "expected": [ " > ", {} ] }, { "name": "0x3f in string", "raw": [ "\" ? \"" ], "header_type": "item", "expected": [ " ? ", {} ] }, { "name": "0x40 in string", "raw": [ "\" @ \"" ], "header_type": "item", "expected": [ " @ ", {} ] }, { "name": "0x41 in string", "raw": [ "\" A \"" ], "header_type": "item", "expected": [ " A ", {} ] }, { "name": "0x42 in string", "raw": [ "\" B \"" ], "header_type": "item", "expected": [ " B ", {} ] }, { "name": "0x43 in string", "raw": [ "\" C \"" ], "header_type": "item", "expected": [ " C ", {} ] }, { "name": "0x44 in string", "raw": [ "\" D \"" ], "header_type": "item", "expected": [ " D ", {} ] }, { "name": "0x45 in string", "raw": [ "\" E \"" ], "header_type": "item", "expected": [ " E ", {} ] }, { "name": "0x46 in string", "raw": [ "\" F \"" ], "header_type": "item", "expected": [ " F ", {} ] }, { "name": "0x47 in string", "raw": [ "\" G \"" ], "header_type": "item", "expected": [ " G ", {} ] }, { "name": "0x48 in string", "raw": [ "\" H \"" ], "header_type": "item", "expected": [ " H ", {} ] }, { "name": "0x49 in string", "raw": [ "\" I \"" ], "header_type": "item", "expected": [ " I ", {} ] }, { "name": "0x4a in string", "raw": [ "\" J \"" ], "header_type": "item", "expected": [ " J ", {} ] }, { "name": "0x4b in string", "raw": [ "\" K \"" ], "header_type": "item", "expected": [ " K ", {} ] }, { "name": "0x4c in string", "raw": [ "\" L \"" ], "header_type": "item", "expected": [ " L ", {} ] }, { "name": "0x4d in string", "raw": [ "\" M \"" ], "header_type": "item", "expected": [ " M ", {} ] }, { "name": "0x4e in string", "raw": [ "\" N \"" ], "header_type": "item", "expected": [ " N ", {} ] }, { "name": "0x4f in string", "raw": [ "\" O \"" ], "header_type": "item", "expected": [ " O ", {} ] }, { "name": "0x50 in string", "raw": [ "\" P \"" ], "header_type": "item", "expected": [ " P ", {} ] }, { "name": "0x51 in string", "raw": [ "\" Q \"" ], "header_type": "item", "expected": [ " Q ", {} ] }, { "name": "0x52 in string", "raw": [ "\" R \"" ], "header_type": "item", "expected": [ " R ", {} ] }, { "name": "0x53 in string", "raw": [ "\" S \"" ], "header_type": "item", "expected": [ " S ", {} ] }, { "name": "0x54 in string", "raw": [ "\" T \"" ], "header_type": "item", "expected": [ " T ", {} ] }, { "name": "0x55 in string", "raw": [ "\" U \"" ], "header_type": "item", "expected": [ " U ", {} ] }, { "name": "0x56 in string", "raw": [ "\" V \"" ], "header_type": "item", "expected": [ " V ", {} ] }, { "name": "0x57 in string", "raw": [ "\" W \"" ], "header_type": "item", "expected": [ " W ", {} ] }, { "name": "0x58 in string", "raw": [ "\" X \"" ], "header_type": "item", "expected": [ " X ", {} ] }, { "name": "0x59 in string", "raw": [ "\" Y \"" ], "header_type": "item", "expected": [ " Y ", {} ] }, { "name": "0x5a in string", "raw": [ "\" Z \"" ], "header_type": "item", "expected": [ " Z ", {} ] }, { "name": "0x5b in string", "raw": [ "\" [ \"" ], "header_type": "item", "expected": [ " [ ", {} ] }, { "name": "0x5c in string", "raw": [ "\" \\ \"" ], "header_type": "item", "must_fail": true }, { "name": "0x5d in string", "raw": [ "\" ] \"" ], "header_type": "item", "expected": [ " ] ", {} ] }, { "name": "0x5e in string", "raw": [ "\" ^ \"" ], "header_type": "item", "expected": [ " ^ ", {} ] }, { "name": "0x5f in string", "raw": [ "\" _ \"" ], "header_type": "item", "expected": [ " _ ", {} ] }, { "name": "0x60 in string", "raw": [ "\" ` \"" ], "header_type": "item", "expected": [ " ` ", {} ] }, { "name": "0x61 in string", "raw": [ "\" a \"" ], "header_type": "item", "expected": [ " a ", {} ] }, { "name": "0x62 in string", "raw": [ "\" b \"" ], "header_type": "item", "expected": [ " b ", {} ] }, { "name": "0x63 in string", "raw": [ "\" c \"" ], "header_type": "item", "expected": [ " c ", {} ] }, { "name": "0x64 in string", "raw": [ "\" d \"" ], "header_type": "item", "expected": [ " d ", {} ] }, { "name": "0x65 in string", "raw": [ "\" e \"" ], "header_type": "item", "expected": [ " e ", {} ] }, { "name": "0x66 in string", "raw": [ "\" f \"" ], "header_type": "item", "expected": [ " f ", {} ] }, { "name": "0x67 in string", "raw": [ "\" g \"" ], "header_type": "item", "expected": [ " g ", {} ] }, { "name": "0x68 in string", "raw": [ "\" h \"" ], "header_type": "item", "expected": [ " h ", {} ] }, { "name": "0x69 in string", "raw": [ "\" i \"" ], "header_type": "item", "expected": [ " i ", {} ] }, { "name": "0x6a in string", "raw": [ "\" j \"" ], "header_type": "item", "expected": [ " j ", {} ] }, { "name": "0x6b in string", "raw": [ "\" k \"" ], "header_type": "item", "expected": [ " k ", {} ] }, { "name": "0x6c in string", "raw": [ "\" l \"" ], "header_type": "item", "expected": [ " l ", {} ] }, { "name": "0x6d in string", "raw": [ "\" m \"" ], "header_type": "item", "expected": [ " m ", {} ] }, { "name": "0x6e in string", "raw": [ "\" n \"" ], "header_type": "item", "expected": [ " n ", {} ] }, { "name": "0x6f in string", "raw": [ "\" o \"" ], "header_type": "item", "expected": [ " o ", {} ] }, { "name": "0x70 in string", "raw": [ "\" p \"" ], "header_type": "item", "expected": [ " p ", {} ] }, { "name": "0x71 in string", "raw": [ "\" q \"" ], "header_type": "item", "expected": [ " q ", {} ] }, { "name": "0x72 in string", "raw": [ "\" r \"" ], "header_type": "item", "expected": [ " r ", {} ] }, { "name": "0x73 in string", "raw": [ "\" s \"" ], "header_type": "item", "expected": [ " s ", {} ] }, { "name": "0x74 in string", "raw": [ "\" t \"" ], "header_type": "item", "expected": [ " t ", {} ] }, { "name": "0x75 in string", "raw": [ "\" u \"" ], "header_type": "item", "expected": [ " u ", {} ] }, { "name": "0x76 in string", "raw": [ "\" v \"" ], "header_type": "item", "expected": [ " v ", {} ] }, { "name": "0x77 in string", "raw": [ "\" w \"" ], "header_type": "item", "expected": [ " w ", {} ] }, { "name": "0x78 in string", "raw": [ "\" x \"" ], "header_type": "item", "expected": [ " x ", {} ] }, { "name": "0x79 in string", "raw": [ "\" y \"" ], "header_type": "item", "expected": [ " y ", {} ] }, { "name": "0x7a in string", "raw": [ "\" z \"" ], "header_type": "item", "expected": [ " z ", {} ] }, { "name": "0x7b in string", "raw": [ "\" { \"" ], "header_type": "item", "expected": [ " { ", {} ] }, { "name": "0x7c in string", "raw": [ "\" | \"" ], "header_type": "item", "expected": [ " | ", {} ] }, { "name": "0x7d in string", "raw": [ "\" } \"" ], "header_type": "item", "expected": [ " } ", {} ] }, { "name": "0x7e in string", "raw": [ "\" ~ \"" ], "header_type": "item", "expected": [ " ~ ", {} ] }, { "name": "0x7f in string", "raw": [ "\" \u007f \"" ], "header_type": "item", "must_fail": true }, { "name": "0x00 in string", "raw": [ "\"\\\u0000\"" ], "header_type": "item", "must_fail": true }, { "name": "0x01 in string", "raw": [ "\"\\\u0001\"" ], "header_type": "item", "must_fail": true }, { "name": "0x02 in string", "raw": [ "\"\\\u0002\"" ], "header_type": "item", "must_fail": true }, { "name": "0x03 in string", "raw": [ "\"\\\u0003\"" ], "header_type": "item", "must_fail": true }, { "name": "0x04 in string", "raw": [ "\"\\\u0004\"" ], "header_type": "item", "must_fail": true }, { "name": "0x05 in string", "raw": [ "\"\\\u0005\"" ], "header_type": "item", "must_fail": true }, { "name": "0x06 in string", "raw": [ "\"\\\u0006\"" ], "header_type": "item", "must_fail": true }, { "name": "0x07 in string", "raw": [ "\"\\\u0007\"" ], "header_type": "item", "must_fail": true }, { "name": "0x08 in string", "raw": [ "\"\\\b\"" ], "header_type": "item", "must_fail": true }, { "name": "0x09 in string", "raw": [ "\"\\\t\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0a in string", "raw": [ "\"\\\n\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0b in string", "raw": [ "\"\\\u000b\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0c in string", "raw": [ "\"\\\f\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0d in string", "raw": [ "\"\\\r\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0e in string", "raw": [ "\"\\\u000e\"" ], "header_type": "item", "must_fail": true }, { "name": "0x0f in string", "raw": [ "\"\\\u000f\"" ], "header_type": "item", "must_fail": true }, { "name": "0x10 in string", "raw": [ "\"\\\u0010\"" ], "header_type": "item", "must_fail": true }, { "name": "0x11 in string", "raw": [ "\"\\\u0011\"" ], "header_type": "item", "must_fail": true }, { "name": "0x12 in string", "raw": [ "\"\\\u0012\"" ], "header_type": "item", "must_fail": true }, { "name": "0x13 in string", "raw": [ "\"\\\u0013\"" ], "header_type": "item", "must_fail": true }, { "name": "0x14 in string", "raw": [ "\"\\\u0014\"" ], "header_type": "item", "must_fail": true }, { "name": "0x15 in string", "raw": [ "\"\\\u0015\"" ], "header_type": "item", "must_fail": true }, { "name": "0x16 in string", "raw": [ "\"\\\u0016\"" ], "header_type": "item", "must_fail": true }, { "name": "0x17 in string", "raw": [ "\"\\\u0017\"" ], "header_type": "item", "must_fail": true }, { "name": "0x18 in string", "raw": [ "\"\\\u0018\"" ], "header_type": "item", "must_fail": true }, { "name": "0x19 in string", "raw": [ "\"\\\u0019\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1a in string", "raw": [ "\"\\\u001a\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1b in string", "raw": [ "\"\\\u001b\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1c in string", "raw": [ "\"\\\u001c\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1d in string", "raw": [ "\"\\\u001d\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1e in string", "raw": [ "\"\\\u001e\"" ], "header_type": "item", "must_fail": true }, { "name": "0x1f in string", "raw": [ "\"\\\u001f\"" ], "header_type": "item", "must_fail": true }, { "name": "0x20 in string", "raw": [ "\"\\ \"" ], "header_type": "item", "must_fail": true }, { "name": "0x21 in string", "raw": [ "\"\\!\"" ], "header_type": "item", "must_fail": true }, { "name": "0x22 in string", "raw": [ "\"\\\"\"" ], "header_type": "item", "expected": [ "\"", {} ] }, { "name": "0x23 in string", "raw": [ "\"\\#\"" ], "header_type": "item", "must_fail": true }, { "name": "0x24 in string", "raw": [ "\"\\$\"" ], "header_type": "item", "must_fail": true }, { "name": "0x25 in string", "raw": [ "\"\\%\"" ], "header_type": "item", "must_fail": true }, { "name": "0x26 in string", "raw": [ "\"\\&\"" ], "header_type": "item", "must_fail": true }, { "name": "0x27 in string", "raw": [ "\"\\'\"" ], "header_type": "item", "must_fail": true }, { "name": "0x28 in string", "raw": [ "\"\\(\"" ], "header_type": "item", "must_fail": true }, { "name": "0x29 in string", "raw": [ "\"\\)\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2a in string", "raw": [ "\"\\*\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2b in string", "raw": [ "\"\\+\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2c in string", "raw": [ "\"\\,\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2d in string", "raw": [ "\"\\-\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2e in string", "raw": [ "\"\\.\"" ], "header_type": "item", "must_fail": true }, { "name": "0x2f in string", "raw": [ "\"\\/\"" ], "header_type": "item", "must_fail": true }, { "name": "0x30 in string", "raw": [ "\"\\0\"" ], "header_type": "item", "must_fail": true }, { "name": "0x31 in string", "raw": [ "\"\\1\"" ], "header_type": "item", "must_fail": true }, { "name": "0x32 in string", "raw": [ "\"\\2\"" ], "header_type": "item", "must_fail": true }, { "name": "0x33 in string", "raw": [ "\"\\3\"" ], "header_type": "item", "must_fail": true }, { "name": "0x34 in string", "raw": [ "\"\\4\"" ], "header_type": "item", "must_fail": true }, { "name": "0x35 in string", "raw": [ "\"\\5\"" ], "header_type": "item", "must_fail": true }, { "name": "0x36 in string", "raw": [ "\"\\6\"" ], "header_type": "item", "must_fail": true }, { "name": "0x37 in string", "raw": [ "\"\\7\"" ], "header_type": "item", "must_fail": true }, { "name": "0x38 in string", "raw": [ "\"\\8\"" ], "header_type": "item", "must_fail": true }, { "name": "0x39 in string", "raw": [ "\"\\9\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3a in string", "raw": [ "\"\\:\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3b in string", "raw": [ "\"\\;\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3c in string", "raw": [ "\"\\<\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3d in string", "raw": [ "\"\\=\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3e in string", "raw": [ "\"\\>\"" ], "header_type": "item", "must_fail": true }, { "name": "0x3f in string", "raw": [ "\"\\?\"" ], "header_type": "item", "must_fail": true }, { "name": "0x40 in string", "raw": [ "\"\\@\"" ], "header_type": "item", "must_fail": true }, { "name": "0x41 in string", "raw": [ "\"\\A\"" ], "header_type": "item", "must_fail": true }, { "name": "0x42 in string", "raw": [ "\"\\B\"" ], "header_type": "item", "must_fail": true }, { "name": "0x43 in string", "raw": [ "\"\\C\"" ], "header_type": "item", "must_fail": true }, { "name": "0x44 in string", "raw": [ "\"\\D\"" ], "header_type": "item", "must_fail": true }, { "name": "0x45 in string", "raw": [ "\"\\E\"" ], "header_type": "item", "must_fail": true }, { "name": "0x46 in string", "raw": [ "\"\\F\"" ], "header_type": "item", "must_fail": true }, { "name": "0x47 in string", "raw": [ "\"\\G\"" ], "header_type": "item", "must_fail": true }, { "name": "0x48 in string", "raw": [ "\"\\H\"" ], "header_type": "item", "must_fail": true }, { "name": "0x49 in string", "raw": [ "\"\\I\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4a in string", "raw": [ "\"\\J\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4b in string", "raw": [ "\"\\K\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4c in string", "raw": [ "\"\\L\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4d in string", "raw": [ "\"\\M\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4e in string", "raw": [ "\"\\N\"" ], "header_type": "item", "must_fail": true }, { "name": "0x4f in string", "raw": [ "\"\\O\"" ], "header_type": "item", "must_fail": true }, { "name": "0x50 in string", "raw": [ "\"\\P\"" ], "header_type": "item", "must_fail": true }, { "name": "0x51 in string", "raw": [ "\"\\Q\"" ], "header_type": "item", "must_fail": true }, { "name": "0x52 in string", "raw": [ "\"\\R\"" ], "header_type": "item", "must_fail": true }, { "name": "0x53 in string", "raw": [ "\"\\S\"" ], "header_type": "item", "must_fail": true }, { "name": "0x54 in string", "raw": [ "\"\\T\"" ], "header_type": "item", "must_fail": true }, { "name": "0x55 in string", "raw": [ "\"\\U\"" ], "header_type": "item", "must_fail": true }, { "name": "0x56 in string", "raw": [ "\"\\V\"" ], "header_type": "item", "must_fail": true }, { "name": "0x57 in string", "raw": [ "\"\\W\"" ], "header_type": "item", "must_fail": true }, { "name": "0x58 in string", "raw": [ "\"\\X\"" ], "header_type": "item", "must_fail": true }, { "name": "0x59 in string", "raw": [ "\"\\Y\"" ], "header_type": "item", "must_fail": true }, { "name": "0x5a in string", "raw": [ "\"\\Z\"" ], "header_type": "item", "must_fail": true }, { "name": "0x5b in string", "raw": [ "\"\\[\"" ], "header_type": "item", "must_fail": true }, { "name": "0x5c in string", "raw": [ "\"\\\\\"" ], "header_type": "item", "expected": [ "\\", {} ] }, { "name": "0x5d in string", "raw": [ "\"\\]\"" ], "header_type": "item", "must_fail": true }, { "name": "0x5e in string", "raw": [ "\"\\^\"" ], "header_type": "item", "must_fail": true }, { "name": "0x5f in string", "raw": [ "\"\\_\"" ], "header_type": "item", "must_fail": true }, { "name": "0x60 in string", "raw": [ "\"\\`\"" ], "header_type": "item", "must_fail": true }, { "name": "0x61 in string", "raw": [ "\"\\a\"" ], "header_type": "item", "must_fail": true }, { "name": "0x62 in string", "raw": [ "\"\\b\"" ], "header_type": "item", "must_fail": true }, { "name": "0x63 in string", "raw": [ "\"\\c\"" ], "header_type": "item", "must_fail": true }, { "name": "0x64 in string", "raw": [ "\"\\d\"" ], "header_type": "item", "must_fail": true }, { "name": "0x65 in string", "raw": [ "\"\\e\"" ], "header_type": "item", "must_fail": true }, { "name": "0x66 in string", "raw": [ "\"\\f\"" ], "header_type": "item", "must_fail": true }, { "name": "0x67 in string", "raw": [ "\"\\g\"" ], "header_type": "item", "must_fail": true }, { "name": "0x68 in string", "raw": [ "\"\\h\"" ], "header_type": "item", "must_fail": true }, { "name": "0x69 in string", "raw": [ "\"\\i\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6a in string", "raw": [ "\"\\j\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6b in string", "raw": [ "\"\\k\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6c in string", "raw": [ "\"\\l\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6d in string", "raw": [ "\"\\m\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6e in string", "raw": [ "\"\\n\"" ], "header_type": "item", "must_fail": true }, { "name": "0x6f in string", "raw": [ "\"\\o\"" ], "header_type": "item", "must_fail": true }, { "name": "0x70 in string", "raw": [ "\"\\p\"" ], "header_type": "item", "must_fail": true }, { "name": "0x71 in string", "raw": [ "\"\\q\"" ], "header_type": "item", "must_fail": true }, { "name": "0x72 in string", "raw": [ "\"\\r\"" ], "header_type": "item", "must_fail": true }, { "name": "0x73 in string", "raw": [ "\"\\s\"" ], "header_type": "item", "must_fail": true }, { "name": "0x74 in string", "raw": [ "\"\\t\"" ], "header_type": "item", "must_fail": true }, { "name": "0x75 in string", "raw": [ "\"\\u\"" ], "header_type": "item", "must_fail": true }, { "name": "0x76 in string", "raw": [ "\"\\v\"" ], "header_type": "item", "must_fail": true }, { "name": "0x77 in string", "raw": [ "\"\\w\"" ], "header_type": "item", "must_fail": true }, { "name": "0x78 in string", "raw": [ "\"\\x\"" ], "header_type": "item", "must_fail": true }, { "name": "0x79 in string", "raw": [ "\"\\y\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7a in string", "raw": [ "\"\\z\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7b in string", "raw": [ "\"\\{\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7c in string", "raw": [ "\"\\|\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7d in string", "raw": [ "\"\\}\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7e in string", "raw": [ "\"\\~\"" ], "header_type": "item", "must_fail": true }, { "name": "0x7f in string", "raw": [ "\"\\\u007f\"" ], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/string.json ================================================ [ { "name": "basic string", "raw": ["\"foo bar\""], "header_type": "item", "expected": ["foo bar", {}] }, { "name": "empty string", "raw": ["\"\""], "header_type": "item", "expected": ["", {}] }, { "name": "long string", "raw": ["\"foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo \""], "header_type": "item", "expected": ["foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo ", {}] }, { "name": "whitespace string", "raw": ["\" \""], "header_type": "item", "expected": [" ", {}] }, { "name": "non-ascii string", "raw": ["\"füü\""], "header_type": "item", "must_fail": true }, { "name": "tab in string", "raw": ["\"\\t\""], "header_type": "item", "must_fail": true }, { "name": "newline in string", "raw": ["\" \\n \""], "header_type": "item", "must_fail": true }, { "name": "single quoted string", "raw": ["'foo'"], "header_type": "item", "must_fail": true }, { "name": "unbalanced string", "raw": ["\"foo"], "header_type": "item", "must_fail": true }, { "name": "string quoting", "raw": ["\"foo \\\"bar\\\" \\\\ baz\""], "header_type": "item", "expected": ["foo \"bar\" \\ baz", {}] }, { "name": "bad string quoting", "raw": ["\"foo \\,\""], "header_type": "item", "must_fail": true }, { "name": "ending string quote", "raw": ["\"foo \\\""], "header_type": "item", "must_fail": true }, { "name": "abruptly ending string quote", "raw": ["\"foo \\"], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/token-generated.json ================================================ [ { "name": "0x00 in token", "raw": [ "a\u0000a" ], "header_type": "item", "must_fail": true }, { "name": "0x01 in token", "raw": [ "a\u0001a" ], "header_type": "item", "must_fail": true }, { "name": "0x02 in token", "raw": [ "a\u0002a" ], "header_type": "item", "must_fail": true }, { "name": "0x03 in token", "raw": [ "a\u0003a" ], "header_type": "item", "must_fail": true }, { "name": "0x04 in token", "raw": [ "a\u0004a" ], "header_type": "item", "must_fail": true }, { "name": "0x05 in token", "raw": [ "a\u0005a" ], "header_type": "item", "must_fail": true }, { "name": "0x06 in token", "raw": [ "a\u0006a" ], "header_type": "item", "must_fail": true }, { "name": "0x07 in token", "raw": [ "a\u0007a" ], "header_type": "item", "must_fail": true }, { "name": "0x08 in token", "raw": [ "a\ba" ], "header_type": "item", "must_fail": true }, { "name": "0x09 in token", "raw": [ "a\ta" ], "header_type": "item", "must_fail": true }, { "name": "0x0a in token", "raw": [ "a\na" ], "header_type": "item", "must_fail": true }, { "name": "0x0b in token", "raw": [ "a\u000ba" ], "header_type": "item", "must_fail": true }, { "name": "0x0c in token", "raw": [ "a\fa" ], "header_type": "item", "must_fail": true }, { "name": "0x0d in token", "raw": [ "a\ra" ], "header_type": "item", "must_fail": true }, { "name": "0x0e in token", "raw": [ "a\u000ea" ], "header_type": "item", "must_fail": true }, { "name": "0x0f in token", "raw": [ "a\u000fa" ], "header_type": "item", "must_fail": true }, { "name": "0x10 in token", "raw": [ "a\u0010a" ], "header_type": "item", "must_fail": true }, { "name": "0x11 in token", "raw": [ "a\u0011a" ], "header_type": "item", "must_fail": true }, { "name": "0x12 in token", "raw": [ "a\u0012a" ], "header_type": "item", "must_fail": true }, { "name": "0x13 in token", "raw": [ "a\u0013a" ], "header_type": "item", "must_fail": true }, { "name": "0x14 in token", "raw": [ "a\u0014a" ], "header_type": "item", "must_fail": true }, { "name": "0x15 in token", "raw": [ "a\u0015a" ], "header_type": "item", "must_fail": true }, { "name": "0x16 in token", "raw": [ "a\u0016a" ], "header_type": "item", "must_fail": true }, { "name": "0x17 in token", "raw": [ "a\u0017a" ], "header_type": "item", "must_fail": true }, { "name": "0x18 in token", "raw": [ "a\u0018a" ], "header_type": "item", "must_fail": true }, { "name": "0x19 in token", "raw": [ "a\u0019a" ], "header_type": "item", "must_fail": true }, { "name": "0x1a in token", "raw": [ "a\u001aa" ], "header_type": "item", "must_fail": true }, { "name": "0x1b in token", "raw": [ "a\u001ba" ], "header_type": "item", "must_fail": true }, { "name": "0x1c in token", "raw": [ "a\u001ca" ], "header_type": "item", "must_fail": true }, { "name": "0x1d in token", "raw": [ "a\u001da" ], "header_type": "item", "must_fail": true }, { "name": "0x1e in token", "raw": [ "a\u001ea" ], "header_type": "item", "must_fail": true }, { "name": "0x1f in token", "raw": [ "a\u001fa" ], "header_type": "item", "must_fail": true }, { "name": "0x20 in token", "raw": [ "a a" ], "header_type": "item", "must_fail": true }, { "name": "0x21 in token", "raw": [ "a!a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a!a" }, {} ] }, { "name": "0x22 in token", "raw": [ "a\"a" ], "header_type": "item", "must_fail": true }, { "name": "0x23 in token", "raw": [ "a#a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a#a" }, {} ] }, { "name": "0x24 in token", "raw": [ "a$a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a$a" }, {} ] }, { "name": "0x25 in token", "raw": [ "a%a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a%a" }, {} ] }, { "name": "0x26 in token", "raw": [ "a&a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a&a" }, {} ] }, { "name": "0x27 in token", "raw": [ "a'a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a'a" }, {} ] }, { "name": "0x28 in token", "raw": [ "a(a" ], "header_type": "item", "must_fail": true }, { "name": "0x29 in token", "raw": [ "a)a" ], "header_type": "item", "must_fail": true }, { "name": "0x2a in token", "raw": [ "a*a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a*a" }, {} ] }, { "name": "0x2b in token", "raw": [ "a+a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a+a" }, {} ] }, { "name": "0x2c in token", "raw": [ "a,a" ], "header_type": "item", "must_fail": true }, { "name": "0x2d in token", "raw": [ "a-a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a-a" }, {} ] }, { "name": "0x2e in token", "raw": [ "a.a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a.a" }, {} ] }, { "name": "0x2f in token", "raw": [ "a/a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a/a" }, {} ] }, { "name": "0x30 in token", "raw": [ "a0a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a0a" }, {} ] }, { "name": "0x31 in token", "raw": [ "a1a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a1a" }, {} ] }, { "name": "0x32 in token", "raw": [ "a2a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a2a" }, {} ] }, { "name": "0x33 in token", "raw": [ "a3a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a3a" }, {} ] }, { "name": "0x34 in token", "raw": [ "a4a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a4a" }, {} ] }, { "name": "0x35 in token", "raw": [ "a5a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a5a" }, {} ] }, { "name": "0x36 in token", "raw": [ "a6a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a6a" }, {} ] }, { "name": "0x37 in token", "raw": [ "a7a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a7a" }, {} ] }, { "name": "0x38 in token", "raw": [ "a8a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a8a" }, {} ] }, { "name": "0x39 in token", "raw": [ "a9a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a9a" }, {} ] }, { "name": "0x3a in token", "raw": [ "a:a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a:a" }, {} ] }, { "name": "0x3b in token", "raw": [ "a;a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a" }, { "a": true } ] }, { "name": "0x3c in token", "raw": [ "aa" ], "header_type": "item", "must_fail": true }, { "name": "0x3f in token", "raw": [ "a?a" ], "header_type": "item", "must_fail": true }, { "name": "0x40 in token", "raw": [ "a@a" ], "header_type": "item", "must_fail": true }, { "name": "0x41 in token", "raw": [ "aAa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aAa" }, {} ] }, { "name": "0x42 in token", "raw": [ "aBa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aBa" }, {} ] }, { "name": "0x43 in token", "raw": [ "aCa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aCa" }, {} ] }, { "name": "0x44 in token", "raw": [ "aDa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aDa" }, {} ] }, { "name": "0x45 in token", "raw": [ "aEa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aEa" }, {} ] }, { "name": "0x46 in token", "raw": [ "aFa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aFa" }, {} ] }, { "name": "0x47 in token", "raw": [ "aGa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aGa" }, {} ] }, { "name": "0x48 in token", "raw": [ "aHa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aHa" }, {} ] }, { "name": "0x49 in token", "raw": [ "aIa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aIa" }, {} ] }, { "name": "0x4a in token", "raw": [ "aJa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aJa" }, {} ] }, { "name": "0x4b in token", "raw": [ "aKa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aKa" }, {} ] }, { "name": "0x4c in token", "raw": [ "aLa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aLa" }, {} ] }, { "name": "0x4d in token", "raw": [ "aMa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aMa" }, {} ] }, { "name": "0x4e in token", "raw": [ "aNa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aNa" }, {} ] }, { "name": "0x4f in token", "raw": [ "aOa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aOa" }, {} ] }, { "name": "0x50 in token", "raw": [ "aPa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aPa" }, {} ] }, { "name": "0x51 in token", "raw": [ "aQa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aQa" }, {} ] }, { "name": "0x52 in token", "raw": [ "aRa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aRa" }, {} ] }, { "name": "0x53 in token", "raw": [ "aSa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aSa" }, {} ] }, { "name": "0x54 in token", "raw": [ "aTa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aTa" }, {} ] }, { "name": "0x55 in token", "raw": [ "aUa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aUa" }, {} ] }, { "name": "0x56 in token", "raw": [ "aVa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aVa" }, {} ] }, { "name": "0x57 in token", "raw": [ "aWa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aWa" }, {} ] }, { "name": "0x58 in token", "raw": [ "aXa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aXa" }, {} ] }, { "name": "0x59 in token", "raw": [ "aYa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aYa" }, {} ] }, { "name": "0x5a in token", "raw": [ "aZa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aZa" }, {} ] }, { "name": "0x5b in token", "raw": [ "a[a" ], "header_type": "item", "must_fail": true }, { "name": "0x5c in token", "raw": [ "a\\a" ], "header_type": "item", "must_fail": true }, { "name": "0x5d in token", "raw": [ "a]a" ], "header_type": "item", "must_fail": true }, { "name": "0x5e in token", "raw": [ "a^a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a^a" }, {} ] }, { "name": "0x5f in token", "raw": [ "a_a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a_a" }, {} ] }, { "name": "0x60 in token", "raw": [ "a`a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a`a" }, {} ] }, { "name": "0x61 in token", "raw": [ "aaa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aaa" }, {} ] }, { "name": "0x62 in token", "raw": [ "aba" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aba" }, {} ] }, { "name": "0x63 in token", "raw": [ "aca" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aca" }, {} ] }, { "name": "0x64 in token", "raw": [ "ada" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ada" }, {} ] }, { "name": "0x65 in token", "raw": [ "aea" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aea" }, {} ] }, { "name": "0x66 in token", "raw": [ "afa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "afa" }, {} ] }, { "name": "0x67 in token", "raw": [ "aga" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aga" }, {} ] }, { "name": "0x68 in token", "raw": [ "aha" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aha" }, {} ] }, { "name": "0x69 in token", "raw": [ "aia" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aia" }, {} ] }, { "name": "0x6a in token", "raw": [ "aja" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aja" }, {} ] }, { "name": "0x6b in token", "raw": [ "aka" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aka" }, {} ] }, { "name": "0x6c in token", "raw": [ "ala" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ala" }, {} ] }, { "name": "0x6d in token", "raw": [ "ama" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ama" }, {} ] }, { "name": "0x6e in token", "raw": [ "ana" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ana" }, {} ] }, { "name": "0x6f in token", "raw": [ "aoa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aoa" }, {} ] }, { "name": "0x70 in token", "raw": [ "apa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "apa" }, {} ] }, { "name": "0x71 in token", "raw": [ "aqa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aqa" }, {} ] }, { "name": "0x72 in token", "raw": [ "ara" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ara" }, {} ] }, { "name": "0x73 in token", "raw": [ "asa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "asa" }, {} ] }, { "name": "0x74 in token", "raw": [ "ata" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ata" }, {} ] }, { "name": "0x75 in token", "raw": [ "aua" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aua" }, {} ] }, { "name": "0x76 in token", "raw": [ "ava" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ava" }, {} ] }, { "name": "0x77 in token", "raw": [ "awa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "awa" }, {} ] }, { "name": "0x78 in token", "raw": [ "axa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "axa" }, {} ] }, { "name": "0x79 in token", "raw": [ "aya" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aya" }, {} ] }, { "name": "0x7a in token", "raw": [ "aza" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aza" }, {} ] }, { "name": "0x7b in token", "raw": [ "a{a" ], "header_type": "item", "must_fail": true }, { "name": "0x7c in token", "raw": [ "a|a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a|a" }, {} ] }, { "name": "0x7d in token", "raw": [ "a}a" ], "header_type": "item", "must_fail": true }, { "name": "0x7e in token", "raw": [ "a~a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a~a" }, {} ] }, { "name": "0x7f in token", "raw": [ "a\u007fa" ], "header_type": "item", "must_fail": true }, { "name": "0x00 starting an token", "raw": [ "\u0000a" ], "header_type": "item", "must_fail": true }, { "name": "0x01 starting an token", "raw": [ "\u0001a" ], "header_type": "item", "must_fail": true }, { "name": "0x02 starting an token", "raw": [ "\u0002a" ], "header_type": "item", "must_fail": true }, { "name": "0x03 starting an token", "raw": [ "\u0003a" ], "header_type": "item", "must_fail": true }, { "name": "0x04 starting an token", "raw": [ "\u0004a" ], "header_type": "item", "must_fail": true }, { "name": "0x05 starting an token", "raw": [ "\u0005a" ], "header_type": "item", "must_fail": true }, { "name": "0x06 starting an token", "raw": [ "\u0006a" ], "header_type": "item", "must_fail": true }, { "name": "0x07 starting an token", "raw": [ "\u0007a" ], "header_type": "item", "must_fail": true }, { "name": "0x08 starting an token", "raw": [ "\ba" ], "header_type": "item", "must_fail": true }, { "name": "0x09 starting an token", "raw": [ "\ta" ], "header_type": "item", "must_fail": true }, { "name": "0x0a starting an token", "raw": [ "\na" ], "header_type": "item", "must_fail": true }, { "name": "0x0b starting an token", "raw": [ "\u000ba" ], "header_type": "item", "must_fail": true }, { "name": "0x0c starting an token", "raw": [ "\fa" ], "header_type": "item", "must_fail": true }, { "name": "0x0d starting an token", "raw": [ "\ra" ], "header_type": "item", "must_fail": true }, { "name": "0x0e starting an token", "raw": [ "\u000ea" ], "header_type": "item", "must_fail": true }, { "name": "0x0f starting an token", "raw": [ "\u000fa" ], "header_type": "item", "must_fail": true }, { "name": "0x10 starting an token", "raw": [ "\u0010a" ], "header_type": "item", "must_fail": true }, { "name": "0x11 starting an token", "raw": [ "\u0011a" ], "header_type": "item", "must_fail": true }, { "name": "0x12 starting an token", "raw": [ "\u0012a" ], "header_type": "item", "must_fail": true }, { "name": "0x13 starting an token", "raw": [ "\u0013a" ], "header_type": "item", "must_fail": true }, { "name": "0x14 starting an token", "raw": [ "\u0014a" ], "header_type": "item", "must_fail": true }, { "name": "0x15 starting an token", "raw": [ "\u0015a" ], "header_type": "item", "must_fail": true }, { "name": "0x16 starting an token", "raw": [ "\u0016a" ], "header_type": "item", "must_fail": true }, { "name": "0x17 starting an token", "raw": [ "\u0017a" ], "header_type": "item", "must_fail": true }, { "name": "0x18 starting an token", "raw": [ "\u0018a" ], "header_type": "item", "must_fail": true }, { "name": "0x19 starting an token", "raw": [ "\u0019a" ], "header_type": "item", "must_fail": true }, { "name": "0x1a starting an token", "raw": [ "\u001aa" ], "header_type": "item", "must_fail": true }, { "name": "0x1b starting an token", "raw": [ "\u001ba" ], "header_type": "item", "must_fail": true }, { "name": "0x1c starting an token", "raw": [ "\u001ca" ], "header_type": "item", "must_fail": true }, { "name": "0x1d starting an token", "raw": [ "\u001da" ], "header_type": "item", "must_fail": true }, { "name": "0x1e starting an token", "raw": [ "\u001ea" ], "header_type": "item", "must_fail": true }, { "name": "0x1f starting an token", "raw": [ "\u001fa" ], "header_type": "item", "must_fail": true }, { "name": "0x20 starting an token", "raw": [ " a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "a" }, {} ], "canonical": [ "a" ] }, { "name": "0x21 starting an token", "raw": [ "!a" ], "header_type": "item", "must_fail": true }, { "name": "0x22 starting an token", "raw": [ "\"a" ], "header_type": "item", "must_fail": true }, { "name": "0x23 starting an token", "raw": [ "#a" ], "header_type": "item", "must_fail": true }, { "name": "0x24 starting an token", "raw": [ "$a" ], "header_type": "item", "must_fail": true }, { "name": "0x25 starting an token", "raw": [ "%a" ], "header_type": "item", "must_fail": true }, { "name": "0x26 starting an token", "raw": [ "&a" ], "header_type": "item", "must_fail": true }, { "name": "0x27 starting an token", "raw": [ "'a" ], "header_type": "item", "must_fail": true }, { "name": "0x28 starting an token", "raw": [ "(a" ], "header_type": "item", "must_fail": true }, { "name": "0x29 starting an token", "raw": [ ")a" ], "header_type": "item", "must_fail": true }, { "name": "0x2a starting an token", "raw": [ "*a" ], "header_type": "item", "expected": [ { "__type": "token", "value": "*a" }, {} ] }, { "name": "0x2b starting an token", "raw": [ "+a" ], "header_type": "item", "must_fail": true }, { "name": "0x2c starting an token", "raw": [ ",a" ], "header_type": "item", "must_fail": true }, { "name": "0x2d starting an token", "raw": [ "-a" ], "header_type": "item", "must_fail": true }, { "name": "0x2e starting an token", "raw": [ ".a" ], "header_type": "item", "must_fail": true }, { "name": "0x2f starting an token", "raw": [ "/a" ], "header_type": "item", "must_fail": true }, { "name": "0x30 starting an token", "raw": [ "0a" ], "header_type": "item", "must_fail": true }, { "name": "0x31 starting an token", "raw": [ "1a" ], "header_type": "item", "must_fail": true }, { "name": "0x32 starting an token", "raw": [ "2a" ], "header_type": "item", "must_fail": true }, { "name": "0x33 starting an token", "raw": [ "3a" ], "header_type": "item", "must_fail": true }, { "name": "0x34 starting an token", "raw": [ "4a" ], "header_type": "item", "must_fail": true }, { "name": "0x35 starting an token", "raw": [ "5a" ], "header_type": "item", "must_fail": true }, { "name": "0x36 starting an token", "raw": [ "6a" ], "header_type": "item", "must_fail": true }, { "name": "0x37 starting an token", "raw": [ "7a" ], "header_type": "item", "must_fail": true }, { "name": "0x38 starting an token", "raw": [ "8a" ], "header_type": "item", "must_fail": true }, { "name": "0x39 starting an token", "raw": [ "9a" ], "header_type": "item", "must_fail": true }, { "name": "0x3a starting an token", "raw": [ ":a" ], "header_type": "item", "must_fail": true }, { "name": "0x3b starting an token", "raw": [ ";a" ], "header_type": "item", "must_fail": true }, { "name": "0x3c starting an token", "raw": [ "a" ], "header_type": "item", "must_fail": true }, { "name": "0x3f starting an token", "raw": [ "?a" ], "header_type": "item", "must_fail": true }, { "name": "0x40 starting an token", "raw": [ "@a" ], "header_type": "item", "must_fail": true }, { "name": "0x41 starting an token", "raw": [ "Aa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Aa" }, {} ] }, { "name": "0x42 starting an token", "raw": [ "Ba" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ba" }, {} ] }, { "name": "0x43 starting an token", "raw": [ "Ca" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ca" }, {} ] }, { "name": "0x44 starting an token", "raw": [ "Da" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Da" }, {} ] }, { "name": "0x45 starting an token", "raw": [ "Ea" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ea" }, {} ] }, { "name": "0x46 starting an token", "raw": [ "Fa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Fa" }, {} ] }, { "name": "0x47 starting an token", "raw": [ "Ga" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ga" }, {} ] }, { "name": "0x48 starting an token", "raw": [ "Ha" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ha" }, {} ] }, { "name": "0x49 starting an token", "raw": [ "Ia" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ia" }, {} ] }, { "name": "0x4a starting an token", "raw": [ "Ja" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ja" }, {} ] }, { "name": "0x4b starting an token", "raw": [ "Ka" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ka" }, {} ] }, { "name": "0x4c starting an token", "raw": [ "La" ], "header_type": "item", "expected": [ { "__type": "token", "value": "La" }, {} ] }, { "name": "0x4d starting an token", "raw": [ "Ma" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ma" }, {} ] }, { "name": "0x4e starting an token", "raw": [ "Na" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Na" }, {} ] }, { "name": "0x4f starting an token", "raw": [ "Oa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Oa" }, {} ] }, { "name": "0x50 starting an token", "raw": [ "Pa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Pa" }, {} ] }, { "name": "0x51 starting an token", "raw": [ "Qa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Qa" }, {} ] }, { "name": "0x52 starting an token", "raw": [ "Ra" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ra" }, {} ] }, { "name": "0x53 starting an token", "raw": [ "Sa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Sa" }, {} ] }, { "name": "0x54 starting an token", "raw": [ "Ta" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ta" }, {} ] }, { "name": "0x55 starting an token", "raw": [ "Ua" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ua" }, {} ] }, { "name": "0x56 starting an token", "raw": [ "Va" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Va" }, {} ] }, { "name": "0x57 starting an token", "raw": [ "Wa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Wa" }, {} ] }, { "name": "0x58 starting an token", "raw": [ "Xa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Xa" }, {} ] }, { "name": "0x59 starting an token", "raw": [ "Ya" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Ya" }, {} ] }, { "name": "0x5a starting an token", "raw": [ "Za" ], "header_type": "item", "expected": [ { "__type": "token", "value": "Za" }, {} ] }, { "name": "0x5b starting an token", "raw": [ "[a" ], "header_type": "item", "must_fail": true }, { "name": "0x5c starting an token", "raw": [ "\\a" ], "header_type": "item", "must_fail": true }, { "name": "0x5d starting an token", "raw": [ "]a" ], "header_type": "item", "must_fail": true }, { "name": "0x5e starting an token", "raw": [ "^a" ], "header_type": "item", "must_fail": true }, { "name": "0x5f starting an token", "raw": [ "_a" ], "header_type": "item", "must_fail": true }, { "name": "0x60 starting an token", "raw": [ "`a" ], "header_type": "item", "must_fail": true }, { "name": "0x61 starting an token", "raw": [ "aa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "aa" }, {} ] }, { "name": "0x62 starting an token", "raw": [ "ba" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ba" }, {} ] }, { "name": "0x63 starting an token", "raw": [ "ca" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ca" }, {} ] }, { "name": "0x64 starting an token", "raw": [ "da" ], "header_type": "item", "expected": [ { "__type": "token", "value": "da" }, {} ] }, { "name": "0x65 starting an token", "raw": [ "ea" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ea" }, {} ] }, { "name": "0x66 starting an token", "raw": [ "fa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "fa" }, {} ] }, { "name": "0x67 starting an token", "raw": [ "ga" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ga" }, {} ] }, { "name": "0x68 starting an token", "raw": [ "ha" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ha" }, {} ] }, { "name": "0x69 starting an token", "raw": [ "ia" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ia" }, {} ] }, { "name": "0x6a starting an token", "raw": [ "ja" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ja" }, {} ] }, { "name": "0x6b starting an token", "raw": [ "ka" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ka" }, {} ] }, { "name": "0x6c starting an token", "raw": [ "la" ], "header_type": "item", "expected": [ { "__type": "token", "value": "la" }, {} ] }, { "name": "0x6d starting an token", "raw": [ "ma" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ma" }, {} ] }, { "name": "0x6e starting an token", "raw": [ "na" ], "header_type": "item", "expected": [ { "__type": "token", "value": "na" }, {} ] }, { "name": "0x6f starting an token", "raw": [ "oa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "oa" }, {} ] }, { "name": "0x70 starting an token", "raw": [ "pa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "pa" }, {} ] }, { "name": "0x71 starting an token", "raw": [ "qa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "qa" }, {} ] }, { "name": "0x72 starting an token", "raw": [ "ra" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ra" }, {} ] }, { "name": "0x73 starting an token", "raw": [ "sa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "sa" }, {} ] }, { "name": "0x74 starting an token", "raw": [ "ta" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ta" }, {} ] }, { "name": "0x75 starting an token", "raw": [ "ua" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ua" }, {} ] }, { "name": "0x76 starting an token", "raw": [ "va" ], "header_type": "item", "expected": [ { "__type": "token", "value": "va" }, {} ] }, { "name": "0x77 starting an token", "raw": [ "wa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "wa" }, {} ] }, { "name": "0x78 starting an token", "raw": [ "xa" ], "header_type": "item", "expected": [ { "__type": "token", "value": "xa" }, {} ] }, { "name": "0x79 starting an token", "raw": [ "ya" ], "header_type": "item", "expected": [ { "__type": "token", "value": "ya" }, {} ] }, { "name": "0x7a starting an token", "raw": [ "za" ], "header_type": "item", "expected": [ { "__type": "token", "value": "za" }, {} ] }, { "name": "0x7b starting an token", "raw": [ "{a" ], "header_type": "item", "must_fail": true }, { "name": "0x7c starting an token", "raw": [ "|a" ], "header_type": "item", "must_fail": true }, { "name": "0x7d starting an token", "raw": [ "}a" ], "header_type": "item", "must_fail": true }, { "name": "0x7e starting an token", "raw": [ "~a" ], "header_type": "item", "must_fail": true }, { "name": "0x7f starting an token", "raw": [ "\u007fa" ], "header_type": "item", "must_fail": true } ] ================================================ FILE: Tests/TestFixtures/token.json ================================================ [ { "name": "basic token - item", "raw": ["a_b-c.d3:f%00/*"], "header_type": "item", "expected": [{"__type": "token", "value": "a_b-c.d3:f%00/*"}, {}] }, { "name": "token with capitals - item", "raw": ["fooBar"], "header_type": "item", "expected": [{"__type": "token", "value": "fooBar"}, {}] }, { "name": "token starting with capitals - item", "raw": ["FooBar"], "header_type": "item", "expected": [{"__type": "token", "value": "FooBar"}, {}] }, { "name": "basic token - list", "raw": ["a_b-c3/*"], "header_type": "list", "expected": [[{"__type": "token", "value": "a_b-c3/*"}, {}]] }, { "name": "token with capitals - list", "raw": ["fooBar"], "header_type": "list", "expected": [[{"__type": "token", "value": "fooBar"}, {}]] }, { "name": "token starting with capitals - list", "raw": ["FooBar"], "header_type": "list", "expected": [[{"__type": "token", "value": "FooBar"}, {}]] } ] ================================================ FILE: dev/git.commit.template ================================================ One line description of your change Motivation: Explain here the context, and why you're making that change. What is the problem you're trying to solve. Modifications: Describe the modifications you've done. Result: After your change, what will change.