diff --git a/aeson.cabal b/aeson.cabal
index 508c01f42..1426d34dd 100644
--- a/aeson.cabal
+++ b/aeson.cabal
@@ -166,6 +166,7 @@ test-suite aeson-tests
ErrorMessages
Functions
Instances
+ JSONTestSuite
Options
Properties
PropertyGeneric
diff --git a/tests/JSONTestSuite.hs b/tests/JSONTestSuite.hs
new file mode 100644
index 000000000..70d7cb4ab
--- /dev/null
+++ b/tests/JSONTestSuite.hs
@@ -0,0 +1,80 @@
+module JSONTestSuite (tests) where
+
+import Test.Tasty (TestTree, testGroup)
+import Data.Either.Compat (isLeft, isRight)
+import Test.Tasty.HUnit ( testCase, assertBool )
+import System.Directory (getDirectoryContents)
+import System.FilePath ((>), takeExtension, takeFileName)
+import Data.List (sort)
+import Control.Monad (forM)
+
+import qualified Data.ByteString.Lazy as L
+import qualified Data.HashSet as HashSet
+
+import Data.Aeson
+
+jsonTestSuiteTest :: FilePath -> TestTree
+jsonTestSuiteTest path = testCase fileName $ do
+ payload <- L.readFile path
+ let result = eitherDecode payload :: Either String Value
+ assertBool (show result) $ case take 2 fileName of
+ "n_" -> isLeft result
+ "y_" -> isRight result
+ "i_" | fileName `HashSet.member` ignore_accepted -> isRight result
+ | otherwise -> isLeft result
+ _ | fileName `HashSet.member` transform_rejected -> isLeft result
+ | otherwise -> isRight result -- test_transform tests have inconsistent names
+ where
+ fileName = takeFileName path
+
+-- Build a collection of tests based on the current contents of the
+-- JSONTestSuite test directories.
+
+tests :: IO TestTree
+tests = do
+ let suitePath = "tests/JSONTestSuite"
+ let suites = ["test_parsing", "test_transform"]
+ testPaths <- fmap (sort . concat) . forM suites $ \suite -> do
+ let dir = suitePath > suite
+ entries <- getDirectoryContents dir
+ let ok name = takeExtension name == ".json"
+ return . map (dir >) . filter ok $ entries
+ return $ testGroup "JSONTestSuite" $ map jsonTestSuiteTest testPaths
+
+-- The set expected-to-be-failing JSONTestSuite tests.
+-- Not all of these failures are genuine bugs.
+-- Of those that are bugs, not all are worth fixing.
+
+-- | The @i@ cases we can ignore. We don't.
+--
+-- @i_@ - parsers are free to accept or reject content
+--
+-- We specify which @i_@ case we accept, so we can catch changes even in unspecified behavior.
+-- (There is less case we accept)
+ignore_accepted :: HashSet.HashSet FilePath
+ignore_accepted = HashSet.fromList
+ [ "i_number_double_huge_neg_exp.json"
+ , "i_number_huge_exp.json"
+ , "i_number_neg_int_huge_exp.json"
+ , "i_number_pos_double_huge_exp.json"
+ , "i_number_real_neg_overflow.json"
+ , "i_number_real_pos_overflow.json"
+ , "i_number_real_underflow.json"
+ , "i_number_too_big_neg_int.json"
+ , "i_number_too_big_pos_int.json"
+ , "i_number_very_big_negative_int.json"
+ , "i_structure_500_nested_arrays.json"
+ ]
+
+-- | Transform folder contain weird structures and characters that parsers may understand differently.
+--
+-- We don't even try to understand some.
+transform_rejected :: HashSet.HashSet FilePath
+transform_rejected = HashSet.fromList
+ [ "string_1_escaped_invalid_codepoint.json"
+ , "string_1_invalid_codepoint.json"
+ , "string_2_escaped_invalid_codepoints.json"
+ , "string_2_invalid_codepoints.json"
+ , "string_3_escaped_invalid_codepoints.json"
+ , "string_3_invalid_codepoints.json"
+ ]
\ No newline at end of file
diff --git a/tests/JSONTestSuite/README.md b/tests/JSONTestSuite/README.md
deleted file mode 100644
index c593effb9..000000000
--- a/tests/JSONTestSuite/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# JSON Parsing Test Suite
-A comprehensive test suite for RFC 7159 compliant JSON parsers
-
-This repository was created as an appendix to the article [Parsing JSON is a Minefield 💣](http://seriot.ch/parsing_json.php).
-
-**/parsers/**
-
-This directory contains several parsers and tiny wrappers to turn the parsers into JSON validators, by returning a specific value.
-
-- `0` the parser did accept the content
-- `1` the parser did reject the content
-- `>=1` the process did crash
-- `timeout` happens after 5 seconds
-
-**/test\_parsing/**
-
-The name of these files tell if their contents should be accepted or rejected.
-
-- `y_` content must be accepted by parsers
-- `n_` content must be rejected by parsers
-- `i_` parsers are free to accept or reject content
-
-**/test\_transform/**
-
-These files contain weird structures and characters that parsers may understand differently, eg:
-
-- huge numbers
-- dictionaries with similar keys
-- NULL characters
-- escaped invalid strings
-
-These files were used to produce `results/transform.html`.
-
-**/run_tests.py**
-
-Run all parsers with all files:
-
- $ python3 run_tests.py
-
-Run all parsers with a specific file:
-
- $ python3 run_tests.py file.json
-
-The script writes logs in `results/logs.txt`.
-
-The script then reads `logs.txt` and generates `results/parsing.html`.
-
-**/results/**
-
-
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/bin/test-AppleJSONSerialization b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/bin/test-AppleJSONSerialization
deleted file mode 100755
index 14b9ace90..000000000
Binary files a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/bin/test-AppleJSONSerialization and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.pbxproj
deleted file mode 100644
index a891c5563..000000000
--- a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,260 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 03997F941D70CE0C0001C89F /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03997F931D70CE0C0001C89F /* main.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 03997F8E1D70CE0C0001C89F /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 03997F901D70CE0C0001C89F /* test-AppleJSONSerialization */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "test-AppleJSONSerialization"; sourceTree = BUILT_PRODUCTS_DIR; };
- 03997F931D70CE0C0001C89F /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 03997F8D1D70CE0C0001C89F /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 03997F871D70CE0C0001C89F = {
- isa = PBXGroup;
- children = (
- 03997F921D70CE0C0001C89F /* test-AppleJSONSerialization */,
- 03997F911D70CE0C0001C89F /* Products */,
- );
- sourceTree = "";
- };
- 03997F911D70CE0C0001C89F /* Products */ = {
- isa = PBXGroup;
- children = (
- 03997F901D70CE0C0001C89F /* test-AppleJSONSerialization */,
- );
- name = Products;
- sourceTree = "";
- };
- 03997F921D70CE0C0001C89F /* test-AppleJSONSerialization */ = {
- isa = PBXGroup;
- children = (
- 03997F931D70CE0C0001C89F /* main.swift */,
- );
- path = "test-AppleJSONSerialization";
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 03997F8F1D70CE0C0001C89F /* test-AppleJSONSerialization */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 03997F971D70CE0C0001C89F /* Build configuration list for PBXNativeTarget "test-AppleJSONSerialization" */;
- buildPhases = (
- 03997F8C1D70CE0C0001C89F /* Sources */,
- 03997F8D1D70CE0C0001C89F /* Frameworks */,
- 03997F8E1D70CE0C0001C89F /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "test-AppleJSONSerialization";
- productName = "test-AppleJSONSerialization";
- productReference = 03997F901D70CE0C0001C89F /* test-AppleJSONSerialization */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 03997F881D70CE0C0001C89F /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0800;
- LastUpgradeCheck = 0800;
- ORGANIZATIONNAME = "Nicolas Seriot";
- TargetAttributes = {
- 03997F8F1D70CE0C0001C89F = {
- CreatedOnToolsVersion = 8.0;
- DevelopmentTeam = VBYRKYS73S;
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 03997F8B1D70CE0C0001C89F /* Build configuration list for PBXProject "test-AppleJSONSerialization" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 03997F871D70CE0C0001C89F;
- productRefGroup = 03997F911D70CE0C0001C89F /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 03997F8F1D70CE0C0001C89F /* test-AppleJSONSerialization */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 03997F8C1D70CE0C0001C89F /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 03997F941D70CE0C0001C89F /* main.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 03997F951D70CE0C0001C89F /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_SUSPICIOUS_MOVES = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 03997F961D70CE0C0001C89F /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_SUSPICIOUS_MOVES = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 03997F981D70CE0C0001C89F /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEVELOPMENT_TEAM = VBYRKYS73S;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
- };
- name = Debug;
- };
- 03997F991D70CE0C0001C89F /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEVELOPMENT_TEAM = VBYRKYS73S;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 03997F8B1D70CE0C0001C89F /* Build configuration list for PBXProject "test-AppleJSONSerialization" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03997F951D70CE0C0001C89F /* Debug */,
- 03997F961D70CE0C0001C89F /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 03997F971D70CE0C0001C89F /* Build configuration list for PBXNativeTarget "test-AppleJSONSerialization" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03997F981D70CE0C0001C89F /* Debug */,
- 03997F991D70CE0C0001C89F /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 03997F881D70CE0C0001C89F /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 9ab6e06bf..000000000
--- a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 7bfff1bd3..000000000
Binary files a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-AppleJSONSerialization.xcscheme b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-AppleJSONSerialization.xcscheme
deleted file mode 100644
index 2f4204912..000000000
--- a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-AppleJSONSerialization.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 03df80f80..000000000
--- a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test-AppleJSONSerialization.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 03997F8F1D70CE0C0001C89F
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization/main.swift b/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization/main.swift
deleted file mode 100644
index 9df5aa5dd..000000000
--- a/tests/JSONTestSuite/parsers/test-AppleJSONSerialization/test-AppleJSONSerialization/main.swift
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// main.swift
-// test-AppleJSONSerialization
-//
-// Created by nst on 26/08/16.
-// Copyright © 2016 Nicolas Seriot. All rights reserved.
-//
-
-import Foundation
-
-func main() {
-
- guard ProcessInfo.processInfo.arguments.count == 2 else {
- let url = NSURL(fileURLWithPath: ProcessInfo.processInfo.arguments[0])
- guard let programName = url.lastPathComponent else { exit(1) }
- print("Usage: ./\(programName) file.json")
- exit(1)
- }
-
- let path = ProcessInfo.processInfo.arguments[1]
- let url = NSURL.fileURL(withPath:path)
-
- do {
- let data = try Data(contentsOf:url)
-
- let _ = try JSONSerialization.jsonObject(with: data, options: [.allowFragments])
-
- exit(0)
- } catch {
- exit(1)
- }
-}
-
-main()
diff --git a/tests/JSONTestSuite/parsers/test_Bash_JSON/JSON.sh b/tests/JSONTestSuite/parsers/test_Bash_JSON/JSON.sh
deleted file mode 100755
index 077863385..000000000
--- a/tests/JSONTestSuite/parsers/test_Bash_JSON/JSON.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/bin/sh
-
-throw() {
- echo "$*" >&2
- exit 1
-}
-
-BRIEF=0
-LEAFONLY=0
-PRUNE=0
-NO_HEAD=0
-NORMALIZE_SOLIDUS=0
-
-usage() {
- echo
- echo "Usage: JSON.sh [-b] [-l] [-p] [-s] [-h]"
- echo
- echo "-p - Prune empty. Exclude fields with empty values."
- echo "-l - Leaf only. Only show leaf nodes, which stops data duplication."
- echo "-b - Brief. Combines 'Leaf only' and 'Prune empty' options."
- echo "-n - No-head. Do not show nodes that have no path (lines that start with [])."
- echo "-s - Remove escaping of the solidus symbol (straight slash)."
- echo "-h - This help text."
- echo
-}
-
-parse_options() {
- set -- "$@"
- local ARGN=$#
- while [ "$ARGN" -ne 0 ]
- do
- case $1 in
- -h) usage
- exit 0
- ;;
- -b) BRIEF=1
- LEAFONLY=1
- PRUNE=1
- ;;
- -l) LEAFONLY=1
- ;;
- -p) PRUNE=1
- ;;
- -n) NO_HEAD=1
- ;;
- -s) NORMALIZE_SOLIDUS=1
- ;;
- ?*) echo "ERROR: Unknown option."
- usage
- exit 0
- ;;
- esac
- shift 1
- ARGN=$((ARGN-1))
- done
-}
-
-awk_egrep () {
- local pattern_string=$1
-
- gawk '{
- while ($0) {
- start=match($0, pattern);
- token=substr($0, start, RLENGTH);
- print token;
- $0=substr($0, start+RLENGTH);
- }
- }' pattern="$pattern_string"
-}
-
-tokenize () {
- local GREP
- local ESCAPE
- local CHAR
-
- if echo "test string" | egrep -ao --color=never "test" >/dev/null 2>&1
- then
- GREP='egrep -ao --color=never'
- else
- GREP='egrep -ao'
- fi
-
- if echo "test string" | egrep -o "test" >/dev/null 2>&1
- then
- ESCAPE='(\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})'
- CHAR='[^[:cntrl:]"\\]'
- else
- GREP=awk_egrep
- ESCAPE='(\\\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})'
- CHAR='[^[:cntrl:]"\\\\]'
- fi
-
- local STRING="\"$CHAR*($ESCAPE$CHAR*)*\""
- local NUMBER='-?(0|[1-9][0-9]*)([.][0-9]*)?([eE][+-]?[0-9]*)?'
- local KEYWORD='null|false|true'
- local SPACE='[[:space:]]+'
-
- # Force zsh to expand $A into multiple words
- local is_wordsplit_disabled=$(unsetopt 2>/dev/null | grep -c '^shwordsplit$')
- if [ $is_wordsplit_disabled != 0 ]; then setopt shwordsplit; fi
- $GREP "$STRING|$NUMBER|$KEYWORD|$SPACE|." | egrep -v "^$SPACE$"
- if [ $is_wordsplit_disabled != 0 ]; then unsetopt shwordsplit; fi
-}
-
-parse_array () {
- local index=0
- local ary=''
- read -r token
- case "$token" in
- ']') ;;
- *)
- while :
- do
- parse_value "$1" "$index"
- index=$((index+1))
- ary="$ary""$value"
- read -r token
- case "$token" in
- ']') break ;;
- ',') ary="$ary," ;;
- *) throw "EXPECTED , or ] GOT ${token:-EOF}" ;;
- esac
- read -r token
- done
- ;;
- esac
- [ "$BRIEF" -eq 0 ] && value=$(printf '[%s]' "$ary") || value=
- :
-}
-
-parse_object () {
- local key
- local obj=''
- read -r token
- case "$token" in
- '}') ;;
- *)
- while :
- do
- case "$token" in
- '"'*'"') key=$token ;;
- *) throw "EXPECTED string GOT ${token:-EOF}" ;;
- esac
- read -r token
- case "$token" in
- ':') ;;
- *) throw "EXPECTED : GOT ${token:-EOF}" ;;
- esac
- read -r token
- parse_value "$1" "$key"
- obj="$obj$key:$value"
- read -r token
- case "$token" in
- '}') break ;;
- ',') obj="$obj," ;;
- *) throw "EXPECTED , or } GOT ${token:-EOF}" ;;
- esac
- read -r token
- done
- ;;
- esac
- [ "$BRIEF" -eq 0 ] && value=$(printf '{%s}' "$obj") || value=
- :
-}
-
-parse_value () {
- local jpath="${1:+$1,}$2" isleaf=0 isempty=0 print=0
- case "$token" in
- '{') parse_object "$jpath" ;;
- '[') parse_array "$jpath" ;;
- # At this point, the only valid single-character tokens are digits.
- ''|[!0-9]) throw "EXPECTED value GOT ${token:-EOF}" ;;
- *) value=$token
- # if asked, replace solidus ("\/") in json strings with normalized value: "/"
- [ "$NORMALIZE_SOLIDUS" -eq 1 ] && value=$(echo "$value" | sed 's#\\/#/#g')
- isleaf=1
- [ "$value" = '""' ] && isempty=1
- ;;
- esac
- [ "$value" = '' ] && return
- [ "$NO_HEAD" -eq 1 ] && [ -z "$jpath" ] && return
-
- [ "$LEAFONLY" -eq 0 ] && [ "$PRUNE" -eq 0 ] && print=1
- [ "$LEAFONLY" -eq 1 ] && [ "$isleaf" -eq 1 ] && [ $PRUNE -eq 0 ] && print=1
- [ "$LEAFONLY" -eq 0 ] && [ "$PRUNE" -eq 1 ] && [ "$isempty" -eq 0 ] && print=1
- [ "$LEAFONLY" -eq 1 ] && [ "$isleaf" -eq 1 ] && \
- [ $PRUNE -eq 1 ] && [ $isempty -eq 0 ] && print=1
- [ "$print" -eq 1 ] && printf "[%s]\t%s\n" "$jpath" "$value"
- :
-}
-
-parse () {
- read -r token
- parse_value
- read -r token
- case "$token" in
- '') ;;
- *) throw "EXPECTED EOF GOT $token" ;;
- esac
-}
-
-if ([ "$0" = "$BASH_SOURCE" ] || ! [ -n "$BASH_SOURCE" ]);
-then
- parse_options "$@"
- tokenize | parse
-fi
-
-# vi: expandtab sw=2 ts=2
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/bin/test_Freddy b/tests/JSONTestSuite/parsers/test_Freddy_20160830/bin/test_Freddy
deleted file mode 100755
index 10f4b2994..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_20160830/bin/test_Freddy and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.pbxproj
deleted file mode 100644
index 3ed80c199..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,300 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D84ABA1D5B0A1000776402 /* main.swift */; };
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7781D5B75600021630C /* JSON.swift */; };
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7791D5B75600021630C /* JSONDecodable.swift */; };
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77A1D5B75600021630C /* JSONEncodable.swift */; };
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */; };
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */; };
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77D1D5B75600021630C /* JSONParser.swift */; };
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77E1D5B75600021630C /* JSONParsing.swift */; };
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77F1D5B75600021630C /* JSONSerializing.swift */; };
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7801D5B75600021630C /* JSONSubscripting.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 03D84AB51D5B0A1000776402 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 03D84AB71D5B0A1000776402 /* test_Freddy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_Freddy; sourceTree = BUILT_PRODUCTS_DIR; };
- 03D84ABA1D5B0A1000776402 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
- 03F8F7781D5B75600021630C /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = test_Freddy/JSON.swift; sourceTree = ""; };
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = test_Freddy/JSONDecodable.swift; sourceTree = ""; };
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodable.swift; path = test_Freddy/JSONEncodable.swift; sourceTree = ""; };
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodingDetector.swift; path = test_Freddy/JSONEncodingDetector.swift; sourceTree = ""; };
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = test_Freddy/JSONLiteralConvertible.swift; sourceTree = ""; };
- 03F8F77D1D5B75600021630C /* JSONParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = test_Freddy/JSONParser.swift; sourceTree = ""; };
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = test_Freddy/JSONParsing.swift; sourceTree = ""; };
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = test_Freddy/JSONSerializing.swift; sourceTree = ""; };
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = test_Freddy/JSONSubscripting.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 03D84AB41D5B0A1000776402 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 03D84AAE1D5B0A1000776402 = {
- isa = PBXGroup;
- children = (
- 03F8F7781D5B75600021630C /* JSON.swift */,
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */,
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */,
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */,
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */,
- 03F8F77D1D5B75600021630C /* JSONParser.swift */,
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */,
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */,
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */,
- 03D84AB91D5B0A1000776402 /* test_Freddy */,
- 03D84AB81D5B0A1000776402 /* Products */,
- );
- sourceTree = "";
- };
- 03D84AB81D5B0A1000776402 /* Products */ = {
- isa = PBXGroup;
- children = (
- 03D84AB71D5B0A1000776402 /* test_Freddy */,
- );
- name = Products;
- sourceTree = "";
- };
- 03D84AB91D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXGroup;
- children = (
- 03D84ABA1D5B0A1000776402 /* main.swift */,
- );
- path = test_Freddy;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 03D84AB61D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */;
- buildPhases = (
- 03D84AB31D5B0A1000776402 /* Sources */,
- 03D84AB41D5B0A1000776402 /* Frameworks */,
- 03D84AB51D5B0A1000776402 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = test_Freddy;
- productName = test_Freddy;
- productReference = 03D84AB71D5B0A1000776402 /* test_Freddy */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 03D84AAF1D5B0A1000776402 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0800;
- LastUpgradeCheck = 0800;
- ORGANIZATIONNAME = "Nicolas Seriot";
- TargetAttributes = {
- 03D84AB61D5B0A1000776402 = {
- CreatedOnToolsVersion = 8.0;
- DevelopmentTeam = VBYRKYS73S;
- DevelopmentTeamName = "Nicolas Seriot";
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 03D84AAE1D5B0A1000776402;
- productRefGroup = 03D84AB81D5B0A1000776402 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 03D84AB61D5B0A1000776402 /* test_Freddy */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 03D84AB31D5B0A1000776402 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */,
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */,
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */,
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */,
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */,
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */,
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */,
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */,
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */,
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 03D84ABC1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 03D84ABD1D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 03D84ABF1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 2.3;
- };
- name = Debug;
- };
- 03D84AC01D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 2.3;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABC1D5B0A1000776402 /* Debug */,
- 03D84ABD1D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABF1D5B0A1000776402 /* Debug */,
- 03D84AC01D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 03D84AAF1D5B0A1000776402 /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 95e4cc57e..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
deleted file mode 100644
index fcf13a138..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
-
- },
- "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : 0,
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : 0
- },
- "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7B3DFA55-F9BF-41D8-8FD5-204D3162EB03",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : "dropbox\/JSON\/test_Freddy\/Vendor\/Freddy\/",
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : "dropbox\/"
- },
- "DVTSourceControlWorkspaceBlueprintNameKey" : "test_Freddy",
- "DVTSourceControlWorkspaceBlueprintVersion" : 204,
- "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "JSON\/test_Freddy\/test_Freddy.xcodeproj",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bignerdranch\/Freddy.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "6ADA245F937D8ED6D99F5A7865E19F5267A169E2"
- },
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "\/Users\/nst\/Dropbox\/dropbox.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A"
- }
- ]
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index d241da9da..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
deleted file mode 100644
index e31043938..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index b27bc09bd..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test_Freddy.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 03D84AB61D5B0A1000776402
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSON.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSON.swift
deleted file mode 100644
index c8adae8ca..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSON.swift
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// JSON.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// An enum to describe the structure of JSON.
-public enum JSON {
- /// A case for denoting an array with an associated value of `[JSON]`
- case Array([JSON])
- /// A case for denoting a dictionary with an associated value of `[Swift.String: JSON]`
- case Dictionary([Swift.String: JSON])
- /// A case for denoting a double with an associated value of `Swift.Double`.
- case Double(Swift.Double)
- /// A case for denoting an integer with an associated value of `Swift.Int`.
- case Int(Swift.Int)
- /// A case for denoting a string with an associated value of `Swift.String`.
- case String(Swift.String)
- /// A case for denoting a boolean with an associated value of `Swift.Bool`.
- case Bool(Swift.Bool)
- /// A case for denoting null.
- case Null
-}
-
-// MARK: - Errors
-
-extension JSON {
-
- /// An enum to encapsulate errors that may arise in working with `JSON`.
- public enum Error: ErrorType {
- /// The `index` is out of bounds for a JSON array
- case IndexOutOfBounds(index: Swift.Int)
-
- /// The `key` was not found in the JSON dictionary
- case KeyNotFound(key: Swift.String)
-
- /// The JSON is not subscriptable with `type`
- case UnexpectedSubscript(type: JSONPathType.Type)
-
- /// Unexpected JSON `value` was found that is not convertible `to` type
- case ValueNotConvertible(value: JSON, to: Any.Type)
- }
-
-}
-
-// MARK: - Test Equality
-
-/// Return `true` if `lhs` is equal to `rhs`.
-public func ==(lhs: JSON, rhs: JSON) -> Bool {
- switch (lhs, rhs) {
- case (.Array(let arrL), .Array(let arrR)):
- return arrL == arrR
- case (.Dictionary(let dictL), .Dictionary(let dictR)):
- return dictL == dictR
- case (.String(let strL), .String(let strR)):
- return strL == strR
- case (.Double(let dubL), .Double(let dubR)):
- return dubL == dubR
- case (.Double(let dubL), .Int(let intR)):
- return dubL == Double(intR)
- case (.Int(let intL), .Int(let intR)):
- return intL == intR
- case (.Int(let intL), .Double(let dubR)):
- return Double(intL) == dubR
- case (.Bool(let bL), .Bool(let bR)):
- return bL == bR
- case (.Null, .Null):
- return true
- default:
- return false
- }
-}
-
-extension JSON: Equatable {}
-
-// MARK: - Printing
-
-extension JSON: CustomStringConvertible {
-
- /// A textual representation of `self`.
- public var description: Swift.String {
- switch self {
- case .Array(let arr): return Swift.String(arr)
- case .Dictionary(let dict): return Swift.String(dict)
- case .String(let string): return string
- case .Double(let double): return Swift.String(double)
- case .Int(let int): return Swift.String(int)
- case .Bool(let bool): return Swift.String(bool)
- case .Null: return "null"
- }
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONDecodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONDecodable.swift
deleted file mode 100644
index 2da9bae04..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONDecodable.swift
+++ /dev/null
@@ -1,177 +0,0 @@
-//
-// JSONDecodable.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/24/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// A protocol to provide functionality for creating a model object with a `JSON`
-/// value.
-public protocol JSONDecodable {
-
- /// Creates an instance of the model with a `JSON` instance.
- /// - parameter json: An instance of a `JSON` value from which to
- /// construct an instance of the implementing type.
- /// - throws: Any `JSON.Error` for errors derived from inspecting the
- /// `JSON` value, or any other error involved in decoding.
- init(json: JSON) throws
-
-}
-
-extension Double: JSONDecodable {
-
- /// An initializer to create an instance of `Double` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Double` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- switch json {
- case let .Double(double):
- self = double
- case let .Int(int):
- self = Swift.Double(int)
- default:
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Double)
- }
- }
-
-}
-
-extension Int: JSONDecodable {
-
- /// An initializer to create an instance of `Int` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Int` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- switch json {
- case let .Double(double) where double <= Double(Swift.Int.max):
- self = Swift.Int(double)
- case let .Int(int):
- self = int
- default:
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Int)
- }
- }
-
-}
-
-extension String: JSONDecodable {
-
- /// An initializer to create an instance of `String` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `String` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
-
- switch json {
- case let .String(string):
- self = string
- case let .Int(int):
- self = String(int)
- case let .Bool(bool):
- self = String(bool)
- case let .Double(double):
- self = String(double)
- default:
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.String)
- }
- }
-
-}
-
-extension Bool: JSONDecodable {
-
- /// An initializer to create an instance of `Bool` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Bool` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- guard case let .Bool(bool) = json else {
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Bool)
- }
- self = bool
- }
-
-}
-
-extension RawRepresentable where RawValue: JSONDecodable {
-
- /// An initializer to create an instance of `RawRepresentable` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `RawRepresentable` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- let raw = try json.decode(type: RawValue.self)
- guard let value = Self(rawValue: raw) else {
- throw JSON.Error.ValueNotConvertible(value: json, to: Self.self)
- }
- self = value
- }
-}
-
-internal extension JSON {
-
- /// Retrieves a `[JSON]` from the JSON.
- /// - parameter: A `JSON` to be used to create the returned `Array`.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getArray(json: JSON) throws -> [JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Array.
- guard case let .Array(array) = json else {
- throw Error.ValueNotConvertible(value: json, to: Swift.Array)
- }
- return array
- }
-
- /// Retrieves a `[String: JSON]` from the JSON.
- /// - parameter: A `JSON` to be used to create the returned `Dictionary`.
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getDictionary(json: JSON) throws -> [Swift.String: JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- guard case let .Dictionary(dictionary) = json else {
- throw Error.ValueNotConvertible(value: json, to: Swift.Dictionary)
- }
- return dictionary
- }
-
- /// Attempts to decode many values from a descendant JSON array at a path
- /// into JSON.
- /// - parameter: A `JSON` to be used to create the returned `Array` of some type conforming to `JSONDecodable`.
- /// - returns: An `Array` of `Decoded` elements.
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`, as
- /// well as any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- static func getArrayOf(json: JSON) throws -> [Decoded] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- // This implementation also doesn't do the `type = Type.self` trick.
- return try getArray(json).map(Decoded.init)
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into JSON.
- /// - returns: A `Dictionary` of string keys and `Decoded` values.
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)` or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- static func getDictionaryOf(json: JSON) throws -> [Swift.String: Decoded] {
- guard case let .Dictionary(dictionary) = json else {
- throw Error.ValueNotConvertible(value: json, to: Swift.Dictionary)
- }
- var decodedDictionary = Swift.Dictionary(minimumCapacity: dictionary.count)
- for (key, value) in dictionary {
- decodedDictionary[key] = try Decoded(json: value)
- }
- return decodedDictionary
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodable.swift
deleted file mode 100644
index 480c57bce..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodable.swift
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// JSONEncodable.swift
-// Freddy
-//
-// Created by Matthew Mathias on 1/4/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-/// A protocol to facilitate encoding and decoding of `JSON`.
-public protocol JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON`.
- /// - Note: If conforming to `JSONEncodable` with a custom type of your own, you should return an instance of
- /// `JSON.Dictionary`.
- func toJSON() -> JSON
-}
-
-extension Array where Element: JSONEncodable {
- /// Converts an instance of `Array` whose elements conform to `JSONEncodable` to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Array`.
- public func toJSON() -> JSON {
- let arrayOfJSON = self.map { $0.toJSON() }
- return .Array(arrayOfJSON)
- }
-}
-
-extension Dictionary where Value: JSONEncodable {
- /// Converts an instance of `Dictionary` whose values conform to `JSONEncodable` to `JSON`. The keys in the resulting
- /// `JSON.Dictionary` will be of type `String`.
- /// - returns: An instance of `JSON` where the enum case is `.Dictionary`.
- public func toJSON() -> JSON {
- var jsonDictionary = [String: JSON]()
-
- for (k, v) in self {
- let key = String(k)
- jsonDictionary[key] = v.toJSON()
- }
-
- return .Dictionary(jsonDictionary)
- }
-}
-
-extension Int: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Int`.
- public func toJSON() -> JSON {
- return .Int(self)
- }
-}
-
-extension Double: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Double`.
- public func toJSON() -> JSON {
- return .Double(self)
- }
-}
-
-extension String: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.String`.
- public func toJSON() -> JSON {
- return .String(self)
- }
-}
-
-extension Bool: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Bool`.
- public func toJSON() -> JSON {
- return .Bool(self)
- }
-}
-
-extension RawRepresentable where RawValue: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is whatever the underlying `RawValue` converts to.
- public func toJSON() -> JSON {
- return rawValue.toJSON()
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodingDetector.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodingDetector.swift
deleted file mode 100644
index 933bc0c29..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONEncodingDetector.swift
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// JSONEncodingDetector.swift
-// Freddy
-//
-// Created by Robert Edwards on 1/27/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-/// Struct for attempting to detect the Unicode encoding used with the data supplied to the JSONParser
-public struct JSONEncodingDetector {
-
- //// The Unicode encodings looked for during detection
- public enum Encoding {
- //// UTF-8
- case UTF8
- //// UTF-16 Little Endian
- case UTF16LE
- //// UTF-16 Big Endian
- case UTF16BE
- //// UTF-32 Little Endian
- case UTF32LE
- //// UTF-32 Big Endian
- case UTF32BE
- }
-
- //// The Unicode encodings supported by JSONParser.swift
- public static let supportedEncodings: [Encoding] = [.UTF8]
-
- typealias ByteStreamPrefixInformation = (encoding: Encoding, byteOrderMarkLength: Int)
-
- //// Attempts to detect the Unicode encoding used for a given set of data.
- ////
- //// This function initially looks for a Byte Order Mark in the following form:
- ////
- //// Bytes | Encoding Form
- //// --------------|----------------
- //// 00 00 FE FF | UTF-32, big-endian
- //// FF FE 00 00 | UTF-32, little-endian
- //// FE FF | UTF-16, big-endian
- //// FF FE | UTF-16, little-endian
- //// EF BB BF | UTF-8
- ////
- //// If a BOM is not found then we detect using the following approach described in
- //// the JSON RFC http://www.ietf.org/rfc/rfc4627.txt:
- ////
- //// Since the first two characters of a JSON text will always be ASCII
- //// characters [RFC0020], it is possible to determine whether an octet
- //// stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
- //// at the pattern of nulls in the first four octets.
- ////
- //// 00 00 00 xx UTF-32BE
- //// 00 xx 00 xx UTF-16BE
- //// xx 00 00 00 UTF-32LE
- //// xx 00 xx 00 UTF-16LE
- //// xx xx xx xx UTF-8
- ////
- //// - parameter header: The front Slice of data being read and evaluated.
- //// - returns: A tuple containing the detected Unicode encoding and the lenght of the byte order mark.
- static func detectEncoding(header: Slice>) -> ByteStreamPrefixInformation {
-
- guard let prefix = prefixFromHeader(header) else {
- return (.UTF8, 0)
- }
-
- if let prefixInfo = JSONEncodingDetector.encodingFromBOM(prefix) {
- return prefixInfo
- } else {
- switch prefix {
- case(0, 0, 0?, _):
- return (.UTF32BE, 0)
- case(_, 0, 0?, 0?):
- return (.UTF32LE, 0)
- case (0, _, 0?, _), (0, _, _, _):
- return (.UTF16BE, 0)
- case (_, 0, _, 0?), (_, 0, _, _):
- return (.UTF16LE, 0)
- default:
- return (.UTF8, 0)
- }
- }
- }
-
- private typealias EncodingBytePrefix = (UInt8, UInt8, UInt8?, UInt8?)
-
- private static func prefixFromHeader(header: Slice>) -> EncodingBytePrefix? {
- if header.count >= 4 {
- return(header[0], header[1], header[2], header[3])
- } else if header.count >= 2 {
- return (header[0], header[1], nil, nil)
- }
- return nil
- }
-
- private static func encodingFromBOM(prefix: EncodingBytePrefix) -> ByteStreamPrefixInformation? {
- switch prefix {
- case(0xFE, 0xFF, _, _):
- return (.UTF16BE, 2)
- case(0x00, 0x00, 0xFE?, 0xFF?):
- return (.UTF32BE, 4)
- case(0xEF, 0xBB, 0xBF?, _):
- return (.UTF8, 3)
- case(0xFF, 0xFE, 0?, 0?):
- return (.UTF32LE, 4)
- case(0xFF, 0xFE, _, _):
- return (.UTF16LE, 2)
- default:
- return nil
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONLiteralConvertible.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONLiteralConvertible.swift
deleted file mode 100644
index b90e05264..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONLiteralConvertible.swift
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// JSONLiteralConvertible.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 5/11/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-// MARK: - ArrayLiteralConvertible
-
-extension JSON: ArrayLiteralConvertible {
-
- /// Create an instance by copying each element of the `collection` into a
- /// new `Array`.
- public init(_ collection: Collection) {
- self = .Array(Swift.Array(collection))
- }
-
- /// Create an instance initialized with `elements`.
- public init(arrayLiteral elements: JSON...) {
- self.init(elements)
- }
-
-}
-
-// MARK: - DictionaryLiteralConvertible
-
-extension JSON: DictionaryLiteralConvertible {
-
- /// Create an instance by copying each key/value pair of the `pairs` into
- /// a new `Dictionary`.
- public init(_ pairs: Dictionary) {
- var dictionary = Swift.Dictionary(minimumCapacity: pairs.underestimateCount())
- for (key, value) in pairs {
- dictionary[key] = value
- }
- self = .Dictionary(dictionary)
- }
-
- /// Create an instance initialized with `pairs`.
- public init(dictionaryLiteral pairs: (Swift.String, JSON)...) {
- self.init(pairs)
- }
-
-}
-
-// MARK: - FloatLiteralConvertible
-
-extension JSON: FloatLiteralConvertible {
-
- /// Create an instance initialized to `Double` `value`.
- public init(_ value: Swift.Double) {
- self = .Double(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(floatLiteral value: Swift.Double) {
- self.init(value)
- }
-
-}
-
-// MARK: - IntegerLiteralConvertible
-
-extension JSON: IntegerLiteralConvertible {
-
- /// Create an instance initialized to `Int` by `value`.
- public init(_ value: Swift.Int) {
- self = .Int(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(integerLiteral value: Swift.Int) {
- self.init(value)
- }
-
-}
-
-// MARK: - StringLiteralConvertible
-
-extension JSON: StringLiteralConvertible {
-
- /// Create an instance initialized to `String` by `text`.
- public init(_ text: Swift.String) {
- self = .String(text)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(stringLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(extendedGraphemeClusterLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(unicodeScalarLiteral value: StringLiteralType) {
- self.init(value)
- }
-
-}
-
-// MARK: - BooleanLiteralConvertible
-
-extension JSON: BooleanLiteralConvertible {
-
- /// Create an instance initialized to `Bool` by `value`.
- public init(_ value: Swift.Bool) {
- self = .Bool(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(booleanLiteral value: Swift.Bool) {
- self.init(value)
- }
-
-}
-
-// MARK: - NilLiteralConvertible
-
-extension JSON: NilLiteralConvertible {
-
- /// Create an instance initialized with `nil`.
- public init(nilLiteral: ()) {
- self = .Null
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParser.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParser.swift
deleted file mode 100644
index 31797c3af..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParser.swift
+++ /dev/null
@@ -1,907 +0,0 @@
-//
-// JSONParser.swift
-// Freddy
-//
-// Created by John Gallagher on 4/18/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-import Foundation
-
-private struct Literal {
- static let BACKSLASH = UInt8(ascii: "\\")
- static let BACKSPACE = UInt8(ascii: "\u{0008}")
- static let COLON = UInt8(ascii: ":")
- static let COMMA = UInt8(ascii: ",")
- static let DOUBLE_QUOTE = UInt8(ascii: "\"")
- static let FORMFEED = UInt8(ascii: "\u{000c}")
- static let LEFT_BRACE = UInt8(ascii: "{")
- static let LEFT_BRACKET = UInt8(ascii: "[")
- static let MINUS = UInt8(ascii: "-")
- static let NEWLINE = UInt8(ascii: "\n")
- static let PERIOD = UInt8(ascii: ".")
- static let PLUS = UInt8(ascii: "+")
- static let RETURN = UInt8(ascii: "\r")
- static let RIGHT_BRACE = UInt8(ascii: "}")
- static let RIGHT_BRACKET = UInt8(ascii: "]")
- static let SLASH = UInt8(ascii: "/")
- static let SPACE = UInt8(ascii: " ")
- static let TAB = UInt8(ascii: "\t")
-
- static let a = UInt8(ascii: "a")
- static let b = UInt8(ascii: "b")
- static let c = UInt8(ascii: "c")
- static let d = UInt8(ascii: "d")
- static let e = UInt8(ascii: "e")
- static let f = UInt8(ascii: "f")
- static let l = UInt8(ascii: "l")
- static let n = UInt8(ascii: "n")
- static let r = UInt8(ascii: "r")
- static let s = UInt8(ascii: "s")
- static let t = UInt8(ascii: "t")
- static let u = UInt8(ascii: "u")
-
- static let A = UInt8(ascii: "A")
- static let B = UInt8(ascii: "B")
- static let C = UInt8(ascii: "C")
- static let D = UInt8(ascii: "D")
- static let E = UInt8(ascii: "E")
- static let F = UInt8(ascii: "F")
-
- static let zero = UInt8(ascii: "0")
- static let one = UInt8(ascii: "1")
- static let two = UInt8(ascii: "2")
- static let three = UInt8(ascii: "3")
- static let four = UInt8(ascii: "4")
- static let five = UInt8(ascii: "5")
- static let six = UInt8(ascii: "6")
- static let seven = UInt8(ascii: "7")
- static let eight = UInt8(ascii: "8")
- static let nine = UInt8(ascii: "9")
-}
-
-private let ParserMaximumDepth = 512
-
-
-/// A pure Swift JSON parser. This parser is much faster than the
-/// `NSJSONSerialization`-based parser (due to the overhead of having to
-/// dynamically cast the Objective-C objects to determine their type); however,
-/// it is much newer and has restrictions that the `NSJSONSerialization` parser
-/// does not. Two restrictions in particular are that it requires UTF-8 data as
-/// input and it does not allow trailing commas in arrays or dictionaries.
-public struct JSONParser {
-
- private enum Sign: Int {
- case Positive = 1
- case Negative = -1
- }
-
- private let input: UnsafeBufferPointer
- private let owner: Any?
- private var loc = 0
- private var depth = 0
-
- private init(buffer: UnsafeBufferPointer, owner: T) {
- self.input = buffer
- self.owner = owner
- }
-
- /// Decode the root element of the `JSON` stream. This may be any fragment
- /// or a structural element, per RFC 7159.
- ///
- /// The beginning bytes are used to determine the stream's encoding.
- /// `JSONParser` currently only supports UTF-8 encoding, with or without
- /// a byte-order mark.
- ///
- /// - throws: `JSONParser.Error` for any decoding failures, including a
- /// source location if needed.
- public mutating func parse() throws -> JSON {
- try guardAgainstUnsupportedEncodings()
- let value = try parseValue()
- skipWhitespace()
- guard loc == input.count else {
- throw Error.EndOfStreamGarbage(offset: loc)
- }
- return value
- }
-
- private mutating func parseValue() throws -> JSON {
- guard depth <= ParserMaximumDepth else {
- throw Error.ExceededNestingLimit(offset: loc)
- }
-
- guard input.count > 0 else {
- throw Error.EndOfStreamUnexpected
- }
-
- advancing: while loc < input.count {
- do {
- switch input[loc] {
- case Literal.LEFT_BRACKET:
- depth += 1
- defer { depth -= 1 }
- return try decodeArray()
-
- case Literal.LEFT_BRACE:
- depth += 1
- defer { depth -= 1 }
- return try decodeObject()
-
- case Literal.DOUBLE_QUOTE:
- return try decodeString()
-
- case Literal.f:
- return try decodeFalse()
-
- case Literal.n:
- return try decodeNull()
-
- case Literal.t:
- return try decodeTrue()
-
- case Literal.MINUS:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingMinus))
-
- case Literal.zero:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingZero))
-
- case Literal.one...Literal.nine:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .PreDecimalDigits))
-
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = loc.successor()
-
- default:
- break advancing
- }
- } catch let InternalError.NumberOverflow(offset: start) {
- return try decodeNumberAsString(start)
- }
- }
-
- if loc < input.count {
- throw Error.ValueInvalid(offset: loc, character: UnicodeScalar(input[loc]))
- } else {
- throw Error.EndOfStreamUnexpected
- }
- }
-
- private mutating func skipWhitespace() {
- while loc < input.count {
- switch input[loc] {
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = loc.successor()
-
- default:
- return
- }
- }
- }
-
- private mutating func guardAgainstUnsupportedEncodings() throws {
- let header = input.prefix(4)
- let encodingPrefixInformation = JSONEncodingDetector.detectEncoding(header)
- guard JSONEncodingDetector.supportedEncodings.contains(encodingPrefixInformation.encoding) else {
- throw Error.InvalidUnicodeStreamEncoding(detectedEncoding: encodingPrefixInformation.encoding)
- }
- loc = loc.advancedBy(encodingPrefixInformation.byteOrderMarkLength)
- }
-
- private mutating func decodeNull() throws -> JSON {
- guard loc.advancedBy(3, limit: input.count) != input.count else {
- throw Error.LiteralNilMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.u
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.l {
- throw Error.LiteralNilMisspelled(offset: loc)
- }
-
- loc += 4
- return .Null
- }
-
- private mutating func decodeTrue() throws -> JSON {
- guard loc.advancedBy(3, limit: input.count) != input.count else {
- throw Error.LiteralTrueMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.r
- || input[loc+2] != Literal.u
- || input[loc+3] != Literal.e {
- throw Error.LiteralTrueMisspelled(offset: loc)
- }
-
- loc += 4
- return .Bool(true)
- }
-
- private mutating func decodeFalse() throws -> JSON {
- guard loc.advancedBy(4, limit: input.count) != input.count else {
- throw Error.LiteralFalseMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.a
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.s
- || input[loc+4] != Literal.e {
- throw Error.LiteralFalseMisspelled(offset: loc)
- }
-
- loc += 5
- return .Bool(false)
- }
-
- private var stringDecodingBuffer = [UInt8]()
- private mutating func decodeString() throws -> JSON {
- let start = loc
- loc = loc.successor()
- stringDecodingBuffer.removeAll(keepCapacity: true)
- while loc < input.count {
- switch input[loc] {
- case Literal.BACKSLASH:
- loc = loc.successor()
- switch input[loc] {
- case Literal.DOUBLE_QUOTE: stringDecodingBuffer.append(Literal.DOUBLE_QUOTE)
- case Literal.BACKSLASH: stringDecodingBuffer.append(Literal.BACKSLASH)
- case Literal.SLASH: stringDecodingBuffer.append(Literal.SLASH)
- case Literal.b: stringDecodingBuffer.append(Literal.BACKSPACE)
- case Literal.f: stringDecodingBuffer.append(Literal.FORMFEED)
- case Literal.r: stringDecodingBuffer.append(Literal.RETURN)
- case Literal.t: stringDecodingBuffer.append(Literal.TAB)
- case Literal.n: stringDecodingBuffer.append(Literal.NEWLINE)
- case Literal.u:
- loc = loc.successor()
- try readUnicodeEscape(start: loc - 2)
-
- // readUnicodeEscape() advances loc on its own, so we'll `continue` now
- // to skip the typical "advance past this character" for all the other escapes
- continue
-
- default:
- throw Error.ControlCharacterUnrecognized(offset: loc)
- }
- loc = loc.successor()
-
- case Literal.DOUBLE_QUOTE:
- loc = loc.successor()
- stringDecodingBuffer.append(0)
-
- guard let string = (stringDecodingBuffer.withUnsafeBufferPointer {
- String.fromCString(UnsafePointer($0.baseAddress))
- }) else {
- throw Error.UnicodeEscapeInvalid(offset: start)
- }
-
- return .String(string)
-
- case let other:
- stringDecodingBuffer.append(other)
- loc = loc.successor()
- }
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- private mutating func readCodeUnit() -> UInt16? {
- guard loc + 4 <= input.count else {
- return nil
- }
- var codeUnit: UInt16 = 0
- for c in input[loc.. JSON {
- let start = loc
- loc = loc.successor()
- var items = [JSON]()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACKET {
- loc = loc.successor()
- return .Array(items)
- }
-
- if !items.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
- }
-
- items.append(try parseValue())
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- // Decoding objects can be recursive, so we have to keep more than one
- // buffer around for building up key/value pairs (to reduce allocations
- // when parsing large JSON documents).
- //
- // Rough estimate of the difference between this and using a fresh
- // [(String,JSON)] for the `pairs` variable in decodeObject() below is
- // about 12% on an iPhone 5.
- private struct DecodeObjectBuffers {
- var buffers = [[(String,JSON)]]()
-
- mutating func getBuffer() -> [(String,JSON)] {
- if !buffers.isEmpty {
- var buffer = buffers.removeLast()
- buffer.removeAll(keepCapacity: true)
- return buffer
- }
- return [(String,JSON)]()
- }
-
- mutating func putBuffer(buffer: [(String,JSON)]) {
- buffers.append(buffer)
- }
- }
-
- private var decodeObjectBuffers = DecodeObjectBuffers()
-
- private mutating func decodeObject() throws -> JSON {
- let start = loc
- loc = loc.successor()
- var pairs = decodeObjectBuffers.getBuffer()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACE {
- loc = loc.successor()
- var obj = [String:JSON](minimumCapacity: pairs.count)
- for (k, v) in pairs {
- obj[k] = v
- }
- decodeObjectBuffers.putBuffer(pairs)
- return .Dictionary(obj)
- }
-
- if !pairs.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
-
- skipWhitespace()
- }
-
- guard loc < input.count && input[loc] == Literal.DOUBLE_QUOTE else {
- throw Error.DictionaryMissingKey(offset: start)
- }
-
- let key = try decodeString().string()
- skipWhitespace()
-
- guard loc < input.count && input[loc] == Literal.COLON else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
-
- pairs.append((key, try parseValue()))
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- private mutating func decodeIntegralValue(parser: NumberParser) throws -> JSON {
- var sign = Sign.Positive
- var parser = parser
- var value = 0
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .Done {
- switch parser.state {
- case .LeadingMinus:
- sign = .Negative
- try parser.parseNegative()
-
- case .LeadingZero:
- parser.parseLeadingZero()
-
- case .PreDecimalDigits:
- try parser.parsePreDecimalDigits { c in
- guard case let (exponent, false) = Int.multiplyWithOverflow(10, value) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- guard case let (newValue, false) = Int.addWithOverflow(exponent, Int(c - Literal.zero)) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- value = newValue
- }
-
- case .Decimal, .Exponent:
- return try detectingFloatingPointErrors(parser.start) {
- try decodeFloatingPointValue(parser, sign: sign, value: Double(value))
- }
-
- case .PostDecimalDigits, .ExponentSign, .ExponentDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .Done:
- fatalError("impossible condition")
- }
- }
-
- guard case let (signedValue, false) = Int.multiplyWithOverflow(sign.rawValue, value) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- loc = parser.loc
- return .Int(signedValue)
- }
-
- private mutating func decodeFloatingPointValue(parser: NumberParser, sign: Sign, value: Double) throws -> JSON {
- var parser = parser
- var value = value
- var exponentSign = Sign.Positive
- var exponent = Double(0)
- var position = 0.1
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .Done {
- switch parser.state {
- case .LeadingMinus, .LeadingZero, .PreDecimalDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .Decimal:
- try parser.parseDecimal()
-
- case .PostDecimalDigits:
- parser.parsePostDecimalDigits { c in
- value += position * Double(c - Literal.zero)
- position /= 10
- }
-
- case .Exponent:
- exponentSign = try parser.parseExponent()
-
- case .ExponentSign:
- try parser.parseExponentSign()
-
- case .ExponentDigits:
- parser.parseExponentDigits { c in
- exponent = exponent * 10 + Double(c - Literal.zero)
- }
-
- case .Done:
- fatalError("impossible condition")
- }
- }
-
- loc = parser.loc
- return .Double(Double(sign.rawValue) * value * pow(10, Double(exponentSign.rawValue) * exponent))
- }
-
- private mutating func decodeNumberAsString(start: Int) throws -> JSON {
- var parser: NumberParser = {
- let state: NumberParser.State
- switch input[start] {
- case Literal.MINUS: state = .LeadingMinus
- case Literal.zero: state = .LeadingZero
- case Literal.one...Literal.nine: state = .PreDecimalDigits
- default:
- fatalError("Internal error: decodeNumber called on not-a-number")
- }
- return NumberParser(loc: start, input: input, state: state)
- }()
-
- stringDecodingBuffer.removeAll(keepCapacity: true)
-
- while true {
- switch parser.state {
- case .LeadingMinus:
- try parser.parseNegative()
- stringDecodingBuffer.append(Literal.MINUS)
-
- case .LeadingZero:
- parser.parseLeadingZero()
- stringDecodingBuffer.append(Literal.zero)
-
- case .PreDecimalDigits:
- parser.parsePreDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .Decimal:
- try parser.parseDecimal()
- stringDecodingBuffer.append(Literal.PERIOD)
-
- case .PostDecimalDigits:
- parser.parsePostDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .Exponent:
- stringDecodingBuffer.append(input[parser.loc])
- _ = try parser.parseExponent()
-
- case .ExponentSign:
- stringDecodingBuffer.append(input[parser.loc])
- try parser.parseExponentSign()
-
- case .ExponentDigits:
- parser.parseExponentDigits { stringDecodingBuffer.append($0) }
-
- case .Done:
- stringDecodingBuffer.append(0)
- guard let string = (stringDecodingBuffer.withUnsafeBufferPointer {
- String.fromCString(UnsafePointer($0.baseAddress))
- }) else {
- // Should never fail - any problems with the number string should
- // result in thrown errors above
- fatalError("Internal error: Invalid numeric string")
- }
-
- loc = parser.loc
- return .String(string)
- }
- }
- }
-
- private func detectingFloatingPointErrors(loc: Int, @noescape _ f: () throws -> T) throws -> T {
- let flags = FE_UNDERFLOW | FE_OVERFLOW
- feclearexcept(flags)
- let value = try f()
- guard fetestexcept(flags) == 0 else {
- throw InternalError.NumberOverflow(offset: loc)
- }
- return value
- }
-}
-
-private struct NumberParser {
- enum State {
- case LeadingMinus
- case LeadingZero
- case PreDecimalDigits
- case Decimal
- case PostDecimalDigits
- case Exponent
- case ExponentSign
- case ExponentDigits
- case Done
- }
-
- let start: Int
- var loc = 0
- var state: State
- let input: UnsafeBufferPointer
-
- init(loc: Int, input: UnsafeBufferPointer, state: State) {
- assert(loc < input.count, "Invalid input to NumberParser")
- self.start = loc
- self.loc = loc
- self.input = input
- self.state = state
- }
-
- mutating func parseNegative() throws {
- assert(state == .LeadingMinus, "Unexpected state entering parseNegative")
-
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero:
- state = .LeadingZero
-
- case Literal.one...Literal.nine:
- state = .PreDecimalDigits
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseLeadingZero() {
- assert(state == .LeadingZero, "Unexpected state entering parseLeadingZero")
-
- loc = loc.successor()
- guard loc < input.count else {
- state = .Done
- return
- }
-
- guard input[loc] == Literal.PERIOD else {
- state = .Done
- return
- }
-
- state = .Decimal
- }
-
- mutating func parsePreDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .PreDecimalDigits, "Unexpected state entering parsePreDecimalDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- case Literal.PERIOD:
- state = .Decimal
- return
-
- case Literal.e, Literal.E:
- state = .Exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-
- mutating func parseDecimal() throws {
- assert(state == .Decimal, "Unexpected state entering parseDecimal")
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .PostDecimalDigits
-
- default:
- throw JSONParser.Error.NumberMissingFractionalDigits(offset: start)
- }
- }
-
- mutating func parsePostDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .PostDecimalDigits, "Unexpected state entering parsePostDecimalDigits")
-
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- case Literal.e, Literal.E:
- state = .Exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-
- mutating func parseExponent() throws -> JSONParser.Sign {
- assert(state == .Exponent, "Unexpected state entering parseExponent")
-
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .ExponentDigits
-
- case Literal.PLUS:
- state = .ExponentSign
-
- case Literal.MINUS:
- state = .ExponentSign
- return .Negative
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
-
- return .Positive
- }
-
- mutating func parseExponentSign() throws {
- assert(state == .ExponentSign, "Unexpected state entering parseExponentSign")
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .ExponentDigits
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseExponentDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .ExponentDigits, "Unexpected state entering parseExponentDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-}
-
-public extension JSONParser {
-
- /// Creates a `JSONParser` ready to parse UTF-8 encoded `NSData`.
- ///
- /// If the data is mutable, it is copied before parsing. The data's lifetime
- /// is extended for the duration of parsing.
- init(utf8Data inData: NSData) {
- let data = inData.copy() as! NSData
- let buffer = UnsafeBufferPointer(start: UnsafePointer(data.bytes), count: data.length)
- self.init(buffer: buffer, owner: data)
- }
-
- /// Creates a `JSONParser` from the code units represented by the `string`.
- ///
- /// The synthesized string is lifetime-extended for the duration of parsing.
- init(string: String) {
- let codePoints = string.nulTerminatedUTF8
- let buffer = codePoints.withUnsafeBufferPointer { nulTerminatedBuffer in
- // don't want to include the nul termination in the buffer - trim it off
- UnsafeBufferPointer(start: nulTerminatedBuffer.baseAddress, count: nulTerminatedBuffer.count - 1)
- }
- self.init(buffer: buffer, owner: codePoints)
- }
-
-}
-
-extension JSONParser: JSONParserType {
-
- /// Creates an instance of `JSON` from UTF-8 encoded `NSData`.
- /// - parameter data: An instance of `NSData` to parse `JSON` from.
- /// - throws: Any `JSONParser.Error` that arises during decoding.
- /// - seealso: JSONParser.parse()
- public static func createJSONFromData(data: NSData) throws -> JSON {
- var parser = JSONParser(utf8Data: data)
- return try parser.parse()
- }
-
-}
-
-// MARK: - Errors
-
-extension JSONParser {
-
- /// Enumeration describing possible errors that occur while parsing a JSON
- /// document. Most errors include an associated `offset`, representing the
- /// offset into the UTF-8 characters making up the document where the error
- /// occurred.
- public enum Error: ErrorType {
- /// The parser ran out of data prematurely. This usually means a value
- /// was not escaped, such as a string literal not ending with a double
- /// quote.
- case EndOfStreamUnexpected
-
- /// Unexpected non-whitespace data was left around `offset` after
- /// parsing all valid JSON.
- case EndOfStreamGarbage(offset: Int)
-
- /// Too many nested objects or arrays occured at the literal started
- /// around `offset`.
- case ExceededNestingLimit(offset: Int)
-
- /// A `character` was not a valid start of a value around `offset`.
- case ValueInvalid(offset: Int, character: UnicodeScalar)
-
- /// Badly-formed Unicode escape sequence at `offset`. A Unicode escape
- /// uses the text "\u" followed by 4 hex digits, such as "\uF09F\uA684"
- /// to represent U+1F984, "UNICORN FACE".
- case UnicodeEscapeInvalid(offset: Int)
-
- /// Badly-formed control character around `offset`. JSON supports
- /// backslash-escaped double quotes, slashes, whitespace control codes,
- /// and Unicode escape sequences.
- case ControlCharacterUnrecognized(offset: Int)
-
- /// Invalid token, expected `null` around `offset`
- case LiteralNilMisspelled(offset: Int)
-
- /// Invalid token, expected `true` around `offset`
- case LiteralTrueMisspelled(offset: Int)
-
- /// Invalid token, expected `false` around `offset`
- case LiteralFalseMisspelled(offset: Int)
-
- /// Badly-formed collection at given `offset`, expected `,` or `:`
- case CollectionMissingSeparator(offset: Int)
-
- /// While parsing an object literal, a value was found without a key
- /// around `offset`. The start of a string literal was expected.
- case DictionaryMissingKey(offset: Int)
-
- /// Badly-formed number with no digits around `offset`. After a decimal
- /// point, a number must include some number of digits.
- case NumberMissingFractionalDigits(offset: Int)
-
- /// Badly-formed number with symbols ("-" or "e") but no following
- /// digits around `offset`.
- case NumberSymbolMissingDigits(offset: Int)
-
- /// Supplied data is encoded in an unsupported format.
- case InvalidUnicodeStreamEncoding(detectedEncoding: JSONEncodingDetector.Encoding)
- }
-
- private enum InternalError: ErrorType {
- /// Attempted to parse an integer outside the range of [Int.min, Int.max]
- /// or a double outside the range of representable doubles. Note that
- /// for doubles, this could be an overflow or an underflow - we don't
- /// get enough information from Swift here to know which it is. The number
- /// causing the overflow/underflow began at `offset`.
- case NumberOverflow(offset: Int)
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParsing.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParsing.swift
deleted file mode 100644
index 90cb6be23..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONParsing.swift
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// JSONParsing.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-// MARK: - Deserialize JSON
-
-/// Protocol describing a backend parser that can produce `JSON` from `NSData`.
-public protocol JSONParserType {
-
- /// Creates an instance of `JSON` from `NSData`.
- /// - parameter data: An instance of `NSData` to use to create `JSON`.
- /// - throws: An error that may arise from calling `JSONObjectWithData(_:options:)` on `NSJSONSerialization` with the given data.
- /// - returns: An instance of `JSON`.
- static func createJSONFromData(data: NSData) throws -> JSON
-
-}
-
-extension JSON {
-
- /// Create `JSON` from UTF-8 `data`. By default, parses using the
- /// Swift-native `JSONParser` backend.
- public init(data: NSData, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSONFromData(data)
- }
-
- /// Create `JSON` from UTF-8 `string`.
- public init(jsonString: Swift.String, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSONFromData((jsonString as NSString).dataUsingEncoding(NSUTF8StringEncoding) ?? NSData())
- }
-}
-
-// MARK: - NSJSONSerialization
-
-extension NSJSONSerialization: JSONParserType {
-
- // MARK: Decode NSData
-
- /// Use the built-in, Objective-C based JSON parser to create `JSON`.
- /// - parameter data: An instance of `NSData`.
- /// - returns: An instance of `JSON`.
- /// - throws: An error that may arise if the `NSData` cannot be parsed into an object.
- public static func createJSONFromData(data: NSData) throws -> JSON {
- return makeJSON(try NSJSONSerialization.JSONObjectWithData(data, options: []))
- }
-
- // MARK: Make JSON
-
- /// Makes a `JSON` object by matching its argument to a case in the `JSON` enum.
- /// - parameter object: The instance of `AnyObject` returned from serializing the JSON.
- /// - returns: An instance of `JSON` matching the JSON given to the function.
- private static func makeJSON(object: AnyObject) -> JSON {
- switch object {
- case let n as NSNumber:
- let numberType = CFNumberGetType(n)
- switch numberType {
- case .CharType:
- return .Bool(n.boolValue)
-
- case .ShortType, .IntType, .LongType, .CFIndexType, .NSIntegerType, .SInt8Type, .SInt16Type, .SInt32Type:
- return .Int(n.integerValue)
-
- case .SInt64Type, .LongLongType /* overflows 32-bit Int */:
- #if /* 32-bit arch */ arch(arm) || arch(i386)
- // Why double, when the Freddy parser would bump to String?
- //
- // Returning Double avoids making the type depend on whether you're running
- // 32-bit or 64-bit code when using the NSJSONSerialization parser.
- // NSJSONSerialization appears to bump numbers larger than Int.max to Double on
- // 64-bit platforms but use .SInt64Type on 32-bit platforms.
- // If we returned a String here, you'd get a String value on 32-bit,
- // but a Double value on 64-bit. Instead, we return Double.
- //
- // This means that, if you switch parsers,
- // you'll have to switch from .double to .string for pulling out
- // overflowing values, but if you stick with a single parser,
- // you at least won't have architecture-dependent lookups!
- return .Double(n.doubleValue)
- #else
- return .Int(n.integerValue)
- #endif
-
- case .Float32Type, .Float64Type, .FloatType, .DoubleType, .CGFloatType:
- return .Double(n.doubleValue)
- }
-
- case let arr as [AnyObject]:
- return makeJSONArray(arr)
-
- case let dict as [Swift.String: AnyObject]:
- return makeJSONDictionary(dict)
-
- case let s as Swift.String:
- return .String(s)
-
- default:
- return .Null
- }
- }
-
- // MARK: Make a JSON Array
-
- /// Makes a `JSON` array from the object passed in.
- /// - parameter jsonArray: The array to transform into a `JSON`.
- /// - returns: An instance of `JSON` matching the array.
- private static func makeJSONArray(jsonArray: [AnyObject]) -> JSON {
- return .Array(jsonArray.map(makeJSON))
- }
-
- // MARK: Make a JSON Dictionary
-
- /// Makes a `JSON` dictionary from the Cocoa dictionary passed in.
- /// - parameter jsonDict: The dictionary to transform into `JSON`.
- /// - returns: An instance of `JSON` matching the dictionary.
- private static func makeJSONDictionary(jsonDict: [Swift.String: AnyObject]) -> JSON {
- return JSON(jsonDict.lazy.map { (key, value) in
- (key, makeJSON(value))
- })
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSerializing.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSerializing.swift
deleted file mode 100644
index 343a5a30d..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSerializing.swift
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2016 Big Nerd Ranch, Inc. Licensed under the MIT license WITHOUT ANY WARRANTY.
-
-import Foundation
-
-// MARK: - Serialize JSON
-
-extension JSON {
-
- /// Attempt to serialize `JSON` into an `NSData`.
- /// - returns: A byte-stream containing the `JSON` ready for wire transfer.
- /// - throws: Errors that arise from `NSJSONSerialization`.
- /// - see: Foundation.NSJSONSerialization
- public func serialize() throws -> NSData {
- let obj: AnyObject = toNSJSONSerializationObject()
- return try NSJSONSerialization.dataWithJSONObject(obj, options: [])
- }
-
- /// A function to help with the serialization of `JSON`.
- /// - returns: An `AnyObject` suitable for `NSJSONSerialization`'s use.
- private func toNSJSONSerializationObject() -> AnyObject {
- switch self {
- case .Array(let jsonArray):
- return jsonArray.map { $0.toNSJSONSerializationObject() }
- case .Dictionary(let jsonDictionary):
- var cocoaDictionary = Swift.Dictionary(minimumCapacity: jsonDictionary.count)
- for (key, json) in jsonDictionary {
- cocoaDictionary[key] = json.toNSJSONSerializationObject()
- }
- return cocoaDictionary
- case .String(let str):
- return str
- case .Double(let num):
- return num
- case .Int(let int):
- return int
- case .Bool(let b):
- return b
- case .Null:
- return NSNull()
- }
-
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSubscripting.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSubscripting.swift
deleted file mode 100644
index 78d35f7e9..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/JSONSubscripting.swift
+++ /dev/null
@@ -1,705 +0,0 @@
-//
-// JSONSubscripting.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 8/15/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-// MARK: JSONPathType
-
-/// A protocol used to define a path within an instance of `JSON` that leads to some desired value.
-///
-/// A custom type, such as a `RawRepresentable` enum, may be made to conform to `JSONPathType`
-/// and used with the subscript APIs.
-public protocol JSONPathType {
- /// Use `self` to key into a `dictionary`.
- ///
- /// Unlike Swift dictionaries, failing to find a value for a key should throw
- /// an error rather than convert to `nil`.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON
-
- /// Use `self` to index into an `array`.
- ///
- /// Unlike Swift array, attempting to index outside the collection's bounds
- /// should throw an error rather than crash.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func valueInArray(array: [JSON]) throws -> JSON
-}
-
-extension JSONPathType {
-
- /// The default behavior for keying into a dictionary is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON {
- throw JSON.Error.UnexpectedSubscript(type: Self.self)
- }
-
- /// The default behavior for indexing into an array is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func valueInArray(array: [JSON]) throws -> JSON {
- throw JSON.Error.UnexpectedSubscript(type: Self.self)
- }
-
-}
-
-extension String: JSONPathType {
-
- /// A method used to retrieve a value from a given dictionary for a specific key.
- /// - parameter dictionary: A `Dictionary` with `String` keys and `JSON` values.
- /// - throws: `.KeyNotFound` with an associated value of `self`, where `self` is a `String`,
- /// should the key not be present within the `JSON`.
- /// - returns: The `JSON` value associated with the given key.
- public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON {
- guard let next = dictionary[self] else {
- throw JSON.Error.KeyNotFound(key: self)
- }
- return next
- }
-
-}
-
-extension Int: JSONPathType {
-
- /// A method used to retrieve a value from a given array for a specific index.
- /// - parameter array: An `Array` of `JSON`.
- /// - throws: `.IndexOutOfBounds` with an associated value of `self`, where `self` is an `Int`,
- /// should the index not be within the valid range for the array of `JSON`.
- /// - returns: The `JSON` value found at the given index.
- public func valueInArray(array: [JSON]) throws -> JSON {
- guard case array.indices = self else {
- throw JSON.Error.IndexOutOfBounds(index: self)
- }
- return array[self]
- }
-
-}
-
-// MARK: - Subscripting core
-
-private extension JSON {
-
- enum SubscriptError: ErrorType {
- case SubscriptIntoNull(JSONPathType)
- }
-
- func valueForPathFragment(fragment: JSONPathType, detectNull: Swift.Bool) throws -> JSON {
- switch self {
- case .Null where detectNull:
- throw SubscriptError.SubscriptIntoNull(fragment)
- case let .Dictionary(dict):
- return try fragment.valueInDictionary(dict)
- case let .Array(array):
- return try fragment.valueInArray(array)
- default:
- throw Error.UnexpectedSubscript(type: fragment.dynamicType)
- }
- }
-
- func valueAtPath(path: [JSONPathType], detectNull: Swift.Bool = false) throws -> JSON {
- var result = self
- for fragment in path {
- result = try result.valueForPathFragment(fragment, detectNull: detectNull)
- }
- return result
- }
-
-}
-
-// MARK: - Subscripting operator
-
-extension JSON {
-
- public subscript(key: Swift.String) -> JSON? {
- return try? valueForPathFragment(key, detectNull: false)
- }
-
- public subscript(index: Swift.Int) -> JSON? {
- return try? valueForPathFragment(index, detectNull: false)
- }
-
-}
-
-// MARK: - Simple member unpacking
-
-extension JSON {
-
- /// Attempts to decode into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A given `String` key does not exist inside a
- /// descendant `JSON` dictionary.
- /// * `IndexOutOfBounds`: A given `Int` index is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> Decoded {
- return try Decoded(json: valueAtPath(path))
- }
-
- /// Retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func double(path: JSONPathType...) throws -> Swift.Double {
- return try Swift.Double(json: valueAtPath(path))
- }
-
- /// Retrieves an `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A numeric `Int`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func int(path: JSONPathType...) throws -> Swift.Int {
- return try Swift.Int(json: valueAtPath(path))
- }
-
- /// Retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A textual `String`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func string(path: JSONPathType...) throws -> Swift.String {
- return try Swift.String(json: valueAtPath(path))
- }
-
- /// Retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A truthy `Bool`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func bool(path: JSONPathType...) throws -> Swift.Bool {
- return try Swift.Bool(json: valueAtPath(path))
- }
-
- /// Retrieves a `[JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func array(path: JSONPathType...) throws -> [JSON] {
- return try JSON.getArray(valueAtPath(path))
- }
-
- /// Attempts to decode many values from a descendant JSON array at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`, or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- public func arrayOf(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Decoded] {
- return try JSON.getArrayOf(valueAtPath(path))
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func dictionary(path: JSONPathType...) throws -> [Swift.String: JSON] {
- return try JSON.getDictionary(valueAtPath(path))
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: A `Dictionary` of `String` keys and decoded values.
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)` or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- public func dictionaryOf(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Swift.String: Decoded] {
- return try JSON.getDictionaryOf(valueAtPath(path))
- }
-
-}
-
-// MARK: - NotFound-Or-Null-to-Optional unpacking
-
-extension JSON {
-
- /// An `OptionSetType` used to represent the different options available for subscripting `JSON` with `null` values or missing keys.
- /// * `.NullBecomesNil` - Treat `null` values as `nil`.
- /// * `.MissingKeyBecomesNil` - Treat missing keys as `nil`.
- public struct SubscriptingOptions: OptionSetType {
- public let rawValue: Swift.Int
- public init(rawValue: Swift.Int) {
- self.rawValue = rawValue
- }
-
- /// Treat `null` values as `nil`.
- public static let NullBecomesNil = SubscriptingOptions(rawValue: 1 << 0)
- /// Treat missing keys as `nil`.
- public static let MissingKeyBecomesNil = SubscriptingOptions(rawValue: 1 << 1)
- }
-
- private func mapOptionalAtPath(path: [JSONPathType], alongPath: SubscriptingOptions, @noescape transform: JSON throws -> Value) throws -> Value? {
- let detectNull = alongPath.contains(.NullBecomesNil)
- let detectNotFound = alongPath.contains(.MissingKeyBecomesNil)
- var json: JSON?
- do {
- json = try valueAtPath(path, detectNull: detectNull)
- return try json.map(transform)
- } catch Error.IndexOutOfBounds where detectNotFound {
- return nil
- } catch Error.KeyNotFound where detectNotFound {
- return nil
- } catch Error.ValueNotConvertible where detectNull && json == .Null {
- return nil
- } catch SubscriptError.SubscriptIntoNull where detectNull {
- return nil
- }
- }
-}
-
-extension JSON {
-
- /// Optionally decodes into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: A decoded value from the inner JSON if found, or `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decode(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- /// Optionally retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Double` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func double(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Double? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- /// Optionally retrieves a `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A numeric `Int` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func int(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Int? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- /// Optionally retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A text `String` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func string(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.String? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- /// Optionally retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A truthy `Bool` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func bool(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Bool? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- /// Optionally retrieves a `[JSON]` from a path into the recieving structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: An `Array` of `JSON` elements if a value could be found,
- /// otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func array(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [JSON]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- /// Optionally decodes many values from a descendant array at a path into
- /// JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: An `Array` of decoded elements if found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func arrayOf(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Decoded]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- /// Optionally retrieves a `[String: JSON]` from a path into the recieving
- /// structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Dictionary` of `String` mapping to `JSON` elements if a
- /// value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func dictionary(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [Swift.String: JSON]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
- /// Optionally attempts to decode many values from a descendant object at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: A `Dictionary` of `String` mapping to decoded elements if a
- /// value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func dictionaryOf(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Swift.String: Decoded]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionaryOf)
- }
-
-}
-
-// MARK: - Missing-with-fallback unpacking
-
-extension JSON {
-
- private func mapOptionalAtPath(path: [JSONPathType], @noescape fallback: () -> Value, @noescape transform: JSON throws -> Value) throws -> Value {
- return try mapOptionalAtPath(path, alongPath: .MissingKeyBecomesNil, transform: transform) ?? fallback()
- }
-
- /// Attempts to decode into the returning type from a path into
- /// JSON, or returns a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(path: JSONPathType..., @autoclosure or fallback: () -> Decoded) throws -> Decoded {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Decoded.init)
- }
-
- /// Retrieves a `Double` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Double` to use when one is missing at the subscript.
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by calling `mapOptionalAtPath(_:fallback:transform:)`.
- /// - seealso: `optionalAtPath(_:ifNotFound)`.
- public func double(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Double) throws -> Swift.Double {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Double.init)
- }
-
- /// Retrieves an `Int` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Int` to use when one is missing at the subscript.
- /// - returns: A numeric `Int`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func int(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Int) throws -> Swift.Int {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Int.init)
- }
-
- /// Retrieves a `String` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `String` to use when one is missing at the subscript.
- /// - returns: A textual `String`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func string(path: JSONPathType..., @autoclosure or fallback: () -> Swift.String) throws -> Swift.String {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.String.init)
- }
-
- /// Retrieves a `Bool` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Bool` to use when one is missing at the subscript.
- /// - returns: A truthy `Bool`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func bool(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Bool) throws -> Swift.Bool {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Bool.init)
- }
-
- /// Retrieves a `[JSON]` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Array` to use when one is missing at the subscript.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func array(path: JSONPathType..., @autoclosure or fallback: () -> [JSON]) throws -> [JSON] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArray)
- }
-
- /// Attempts to decodes many values from a desendant JSON array at a path
- /// into the recieving structure, returning a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Array` to use when one is missing at the subscript.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func arrayOf(path: JSONPathType..., @autoclosure or fallback: () -> [Decoded]) throws -> [Decoded] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArrayOf)
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON or a fallback if not
- /// found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Dictionary` to use when one is missing at the subscript.
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func dictionary(path: JSONPathType..., @autoclosure or fallback: () -> [Swift.String: JSON]) throws -> [Swift.String: JSON] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getDictionary)
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into the receiving structure, returning a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript
- /// - returns: A `Dictionary` of `String` mapping to decoded elements.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func dictionaryOf(path: JSONPathType..., @autoclosure or fallback: () -> [Swift.String: Decoded]) throws -> [Swift.String: Decoded] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getDictionaryOf)
- }
-
-
-}
-
-// MARK: - Deprecated methods
-
-extension JSON {
-
- @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.MissingKeyBecomesNil]'")
- public func decode(path: JSONPathType..., ifNotFound: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.NullBecomesNil]'")
- public func decode(path: JSONPathType..., ifNull: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func double(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Double? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func double(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Double? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func int(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Int? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func int(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Int? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func string(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.String? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func string(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.String? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func bool(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Bool? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func bool(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Bool? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func array(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [JSON]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func array(path: JSONPathType..., ifNull: Swift.Bool) throws -> [JSON]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func arrayOf(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Decoded]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func arrayOf(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Decoded]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func dictionary(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Swift.String: JSON]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
- @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func dictionary(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Swift.String: JSON]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/main.swift b/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/main.swift
deleted file mode 100644
index f34af41af..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20160830/test_Freddy/main.swift
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// main.swift
-// test_Freddy
-//
-// Created by nst on 10/08/16.
-// Copyright © 2016 Nicolas Seriot. All rights reserved.
-//
-
-import Foundation
-
-func main() {
-
- guard Process.arguments.count == 2 else {
- let url = NSURL(fileURLWithPath: Process.arguments[0])
- guard let programName = url.lastPathComponent else { exit(1) }
- print("Usage: ./\(programName) file.json")
- exit(1)
- }
-
- let path = Process.arguments[1]
- let url = NSURL.fileURLWithPath(path)
-
- guard let data = NSData(contentsOfURL:url) else {
- print("*** CANNOT READ DATA AT \(url)")
- return
- }
-
- var p = JSONParser(utf8Data: data)
- do {
- try p.parse()
- exit(0)
- } catch {
- exit(1)
- }
-}
-
-main()
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/bin/test_Freddy b/tests/JSONTestSuite/parsers/test_Freddy_20161018/bin/test_Freddy
deleted file mode 100755
index 5f6c85c6b..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_20161018/bin/test_Freddy and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.pbxproj
deleted file mode 100644
index f4cac1cdd..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,300 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D84ABA1D5B0A1000776402 /* main.swift */; };
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7781D5B75600021630C /* JSON.swift */; };
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7791D5B75600021630C /* JSONDecodable.swift */; };
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77A1D5B75600021630C /* JSONEncodable.swift */; };
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */; };
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */; };
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77D1D5B75600021630C /* JSONParser.swift */; };
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77E1D5B75600021630C /* JSONParsing.swift */; };
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77F1D5B75600021630C /* JSONSerializing.swift */; };
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7801D5B75600021630C /* JSONSubscripting.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 03D84AB51D5B0A1000776402 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 03D84AB71D5B0A1000776402 /* test_Freddy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_Freddy; sourceTree = BUILT_PRODUCTS_DIR; };
- 03D84ABA1D5B0A1000776402 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
- 03F8F7781D5B75600021630C /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = test_Freddy/JSON.swift; sourceTree = ""; };
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = test_Freddy/JSONDecodable.swift; sourceTree = ""; };
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodable.swift; path = test_Freddy/JSONEncodable.swift; sourceTree = ""; };
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodingDetector.swift; path = test_Freddy/JSONEncodingDetector.swift; sourceTree = ""; };
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = test_Freddy/JSONLiteralConvertible.swift; sourceTree = ""; };
- 03F8F77D1D5B75600021630C /* JSONParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = test_Freddy/JSONParser.swift; sourceTree = ""; };
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = test_Freddy/JSONParsing.swift; sourceTree = ""; };
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = test_Freddy/JSONSerializing.swift; sourceTree = ""; };
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = test_Freddy/JSONSubscripting.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 03D84AB41D5B0A1000776402 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 03D84AAE1D5B0A1000776402 = {
- isa = PBXGroup;
- children = (
- 03F8F7781D5B75600021630C /* JSON.swift */,
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */,
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */,
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */,
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */,
- 03F8F77D1D5B75600021630C /* JSONParser.swift */,
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */,
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */,
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */,
- 03D84AB91D5B0A1000776402 /* test_Freddy */,
- 03D84AB81D5B0A1000776402 /* Products */,
- );
- sourceTree = "";
- };
- 03D84AB81D5B0A1000776402 /* Products */ = {
- isa = PBXGroup;
- children = (
- 03D84AB71D5B0A1000776402 /* test_Freddy */,
- );
- name = Products;
- sourceTree = "";
- };
- 03D84AB91D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXGroup;
- children = (
- 03D84ABA1D5B0A1000776402 /* main.swift */,
- );
- path = test_Freddy;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 03D84AB61D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */;
- buildPhases = (
- 03D84AB31D5B0A1000776402 /* Sources */,
- 03D84AB41D5B0A1000776402 /* Frameworks */,
- 03D84AB51D5B0A1000776402 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = test_Freddy;
- productName = test_Freddy;
- productReference = 03D84AB71D5B0A1000776402 /* test_Freddy */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 03D84AAF1D5B0A1000776402 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0800;
- LastUpgradeCheck = 0800;
- ORGANIZATIONNAME = "Nicolas Seriot";
- TargetAttributes = {
- 03D84AB61D5B0A1000776402 = {
- CreatedOnToolsVersion = 8.0;
- DevelopmentTeam = VBYRKYS73S;
- DevelopmentTeamName = "Nicolas Seriot";
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 03D84AAE1D5B0A1000776402;
- productRefGroup = 03D84AB81D5B0A1000776402 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 03D84AB61D5B0A1000776402 /* test_Freddy */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 03D84AB31D5B0A1000776402 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */,
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */,
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */,
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */,
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */,
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */,
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */,
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */,
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */,
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 03D84ABC1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 03D84ABD1D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 03D84ABF1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
- };
- name = Debug;
- };
- 03D84AC01D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABC1D5B0A1000776402 /* Debug */,
- 03D84ABD1D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABF1D5B0A1000776402 /* Debug */,
- 03D84AC01D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 03D84AAF1D5B0A1000776402 /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 95e4cc57e..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
deleted file mode 100644
index fcf13a138..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
-
- },
- "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : 0,
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : 0
- },
- "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7B3DFA55-F9BF-41D8-8FD5-204D3162EB03",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : "dropbox\/JSON\/test_Freddy\/Vendor\/Freddy\/",
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : "dropbox\/"
- },
- "DVTSourceControlWorkspaceBlueprintNameKey" : "test_Freddy",
- "DVTSourceControlWorkspaceBlueprintVersion" : 204,
- "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "JSON\/test_Freddy\/test_Freddy.xcodeproj",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bignerdranch\/Freddy.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "6ADA245F937D8ED6D99F5A7865E19F5267A169E2"
- },
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "\/Users\/nst\/Dropbox\/dropbox.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A"
- }
- ]
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 7282d15f6..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
deleted file mode 100644
index e31043938..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index b27bc09bd..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test_Freddy.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 03D84AB61D5B0A1000776402
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSON.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSON.swift
deleted file mode 100755
index ebe2a9239..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSON.swift
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// JSON.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// An enum to describe the structure of JSON.
-public enum JSON {
- /// A case for denoting an array with an associated value of `[JSON]`
- case array([JSON])
- /// A case for denoting a dictionary with an associated value of `[Swift.String: JSON]`
- case dictionary([String: JSON])
- /// A case for denoting a double with an associated value of `Swift.Double`.
- case double(Double)
- /// A case for denoting an integer with an associated value of `Swift.Int`.
- case int(Int)
- /// A case for denoting a string with an associated value of `Swift.String`.
- case string(String)
- /// A case for denoting a boolean with an associated value of `Swift.Bool`.
- case bool(Bool)
- /// A case for denoting null.
- case null
-}
-
-// MARK: - Errors
-
-extension JSON {
-
- /// An enum to encapsulate errors that may arise in working with `JSON`.
- public enum Error: Swift.Error {
- /// The `index` is out of bounds for a JSON array
- case indexOutOfBounds(index: Int)
-
- /// The `key` was not found in the JSON dictionary
- case keyNotFound(key: String)
-
- /// The JSON is not subscriptable with `type`
- case unexpectedSubscript(type: JSONPathType.Type)
-
- /// Unexpected JSON `value` was found that is not convertible `to` type
- case valueNotConvertible(value: JSON, to: Any.Type)
-
- /// The JSON is not serializable to a `String`.
- case stringSerializationError
- }
-
-}
-
-// MARK: - Test Equality
-
-/// Return `true` if `lhs` is equal to `rhs`.
-public func ==(lhs: JSON, rhs: JSON) -> Bool {
- switch (lhs, rhs) {
- case (.array(let arrL), .array(let arrR)):
- return arrL == arrR
- case (.dictionary(let dictL), .dictionary(let dictR)):
- return dictL == dictR
- case (.string(let strL), .string(let strR)):
- return strL == strR
- case (.double(let dubL), .double(let dubR)):
- return dubL == dubR
- case (.double(let dubL), .int(let intR)):
- return dubL == Double(intR)
- case (.int(let intL), .int(let intR)):
- return intL == intR
- case (.int(let intL), .double(let dubR)):
- return Double(intL) == dubR
- case (.bool(let bL), .bool(let bR)):
- return bL == bR
- case (.null, .null):
- return true
- default:
- return false
- }
-}
-
-extension JSON: Equatable {}
-
-// MARK: - Printing
-
-extension JSON: CustomStringConvertible {
-
- /// A textual representation of `self`.
- public var description: Swift.String {
- switch self {
- case .array(let arr): return String(describing: arr)
- case .dictionary(let dict): return String(describing: dict)
- case .string(let string): return string
- case .double(let double): return String(describing: double)
- case .int(let int): return String(describing: int)
- case .bool(let bool): return String(describing: bool)
- case .null: return "null"
- }
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONDecodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONDecodable.swift
deleted file mode 100755
index ea4c03649..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONDecodable.swift
+++ /dev/null
@@ -1,186 +0,0 @@
-//
-// JSONDecodable.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/24/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// A protocol to provide functionality for creating a model object with a `JSON`
-/// value.
-public protocol JSONDecodable {
-
- /// Creates an instance of the model with a `JSON` instance.
- /// - parameter json: An instance of a `JSON` value from which to
- /// construct an instance of the implementing type.
- /// - throws: Any `JSON.Error` for errors derived from inspecting the
- /// `JSON` value, or any other error involved in decoding.
- init(json: JSON) throws
-
-}
-
-extension Double: JSONDecodable {
-
- /// An initializer to create an instance of `Double` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Double` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- if case let .double(double) = json {
- self = double
- } else if case let .int(int) = json {
- self = Double(int)
- } else if case let .string(string) = json, let s = Double(string) {
- self = s
- } else {
- throw JSON.Error.valueNotConvertible(value: json, to: Double.self)
- }
- }
-
-}
-
-extension Int: JSONDecodable {
-
- /// An initializer to create an instance of `Int` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Int` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
-
- if case let .double(double) = json, double <= Double(Int.max) {
- self = Int(double)
- } else if case let .int(int) = json {
- self = int
- } else if case let .string(string) = json, let int = Int(string) {
- self = int
- } else if case let .string(string) = json,
- let double = Double(string),
- let decimalSeparator = string.characters.index(of: "."),
- let int = Int(String(string.characters.prefix(upTo: decimalSeparator))),
- double == Double(int) {
- self = int
- } else {
- throw JSON.Error.valueNotConvertible(value: json, to: Int.self)
- }
- }
-
-}
-
-extension String: JSONDecodable {
-
- /// An initializer to create an instance of `String` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `String` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- switch json {
- case let .string(string):
- self = string
- case let .int(int):
- self = String(int)
- case let .bool(bool):
- self = String(bool)
- case let .double(double):
- self = String(double)
- default:
- throw JSON.Error.valueNotConvertible(value: json, to: String.self)
- }
- }
-
-}
-
-extension Bool: JSONDecodable {
-
- /// An initializer to create an instance of `Bool` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Bool` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- guard case let .bool(bool) = json else {
- throw JSON.Error.valueNotConvertible(value: json, to: Bool.self)
- }
- self = bool
- }
-
-}
-
-extension RawRepresentable where RawValue: JSONDecodable {
-
- /// An initializer to create an instance of `RawRepresentable` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `RawRepresentable` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- let raw = try json.decode(type: RawValue.self)
- guard let value = Self(rawValue: raw) else {
- throw JSON.Error.valueNotConvertible(value: json, to: Self.self)
- }
- self = value
- }
-}
-
-internal extension JSON {
-
- /// Retrieves a `[JSON]` from the JSON.
- /// - parameter: A `JSON` to be used to create the returned `Array`.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getArray(from json: JSON) throws -> [JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Array.
- guard case let .array(array) = json else {
- throw Error.valueNotConvertible(value: json, to: Swift.Array)
- }
- return array
- }
-
- /// Retrieves a `[String: JSON]` from the JSON.
- /// - parameter: A `JSON` to be used to create the returned `Dictionary`.
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getDictionary(from json: JSON) throws -> [String: JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- guard case let .dictionary(dictionary) = json else {
- throw Error.valueNotConvertible(value: json, to: Swift.Dictionary)
- }
- return dictionary
- }
-
- /// Attempts to decode many values from a descendant JSON array at a path
- /// into JSON.
- /// - parameter json: A `JSON` to be used to create the returned `Array` of some type conforming to `JSONDecodable`.
- /// - returns: An `Array` of `Decoded` elements.
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`, as
- /// well as any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- static func decodedArray(from json: JSON) throws -> [Decoded] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- // This implementation also doesn't do the `type = Type.self` trick.
- return try getArray(from: json).map(Decoded.init)
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into JSON.
- /// - parameter json: A `JSON` to be used to create the returned `Dictionary` of some type conforming to `JSONDecodable`.
- /// - returns: A `Dictionary` of string keys and `Decoded` values.
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)` or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- static func decodedDictionary(from json: JSON) throws -> [Swift.String: Decoded] {
- guard case let .dictionary(dictionary) = json else {
- throw Error.valueNotConvertible(value: json, to: Swift.Dictionary)
- }
- var decodedDictionary = Swift.Dictionary(minimumCapacity: dictionary.count)
- for (key, value) in dictionary {
- decodedDictionary[key] = try Decoded(json: value)
- }
- return decodedDictionary
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodable.swift
deleted file mode 100755
index 7da5fd007..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodable.swift
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// JSONEncodable.swift
-// Freddy
-//
-// Created by Matthew Mathias on 1/4/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-/// A protocol to facilitate encoding and decoding of `JSON`.
-public protocol JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON`.
- /// - Note: If conforming to `JSONEncodable` with a custom type of your own, you should return an instance of
- /// `JSON.dictionary`.
- func toJSON() -> JSON
-}
-
-extension Array where Element: JSONEncodable {
- /// Converts an instance of `Array` whose elements conform to `JSONEncodable` to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.array`.
- public func toJSON() -> JSON {
- let arrayOfJSON = self.map { $0.toJSON() }
- return .array(arrayOfJSON)
- }
-}
-
-extension Dictionary where Value: JSONEncodable {
- /// Converts an instance of `Dictionary` whose values conform to `JSONEncodable` to `JSON`. The keys in the resulting
- /// `JSON.dictionary` will be of type `String`.
- /// - returns: An instance of `JSON` where the enum case is `.dictionary`.
- public func toJSON() -> JSON {
- var jsonDictionary = [String: JSON]()
-
- for (k, v) in self {
- let key = String(describing: k)
- jsonDictionary[key] = v.toJSON()
- }
-
- return .dictionary(jsonDictionary)
- }
-}
-
-extension Int: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.int`.
- public func toJSON() -> JSON {
- return .int(self)
- }
-}
-
-extension Double: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.double`.
- public func toJSON() -> JSON {
- return .double(self)
- }
-}
-
-extension String: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.string`.
- public func toJSON() -> JSON {
- return .string(self)
- }
-}
-
-extension Bool: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.bool`.
- public func toJSON() -> JSON {
- return .bool(self)
- }
-}
-
-extension RawRepresentable where RawValue: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is whatever the underlying `RawValue` converts to.
- public func toJSON() -> JSON {
- return rawValue.toJSON()
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodingDetector.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodingDetector.swift
deleted file mode 100755
index 84410f198..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONEncodingDetector.swift
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// JSONEncodingDetector.swift
-// Freddy
-//
-// Created by Robert Edwards on 1/27/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-/// Struct for attempting to detect the Unicode encoding used with the data supplied to the JSONParser
-public struct JSONEncodingDetector {
-
- //// The Unicode encodings looked for during detection
- public enum Encoding {
- //// UTF-8
- case utf8
- //// UTF-16 Little Endian
- case utf16LE
- //// UTF-16 Big Endian
- case utf16BE
- //// UTF-32 Little Endian
- case utf32LE
- //// UTF-32 Big Endian
- case utf32BE
- }
-
- //// The Unicode encodings supported by JSONParser.swift
- public static let supportedEncodings: [Encoding] = [.utf8]
-
- typealias ByteStreamPrefixInformation = (encoding: Encoding, byteOrderMarkLength: Int)
-
- //// Attempts to detect the Unicode encoding used for a given set of data.
- ////
- //// This function initially looks for a Byte Order Mark in the following form:
- ////
- //// Bytes | Encoding Form
- //// --------------|----------------
- //// 00 00 FE FF | UTF-32, big-endian
- //// FF FE 00 00 | UTF-32, little-endian
- //// FE FF | UTF-16, big-endian
- //// FF FE | UTF-16, little-endian
- //// EF BB BF | UTF-8
- ////
- //// If a BOM is not found then we detect using the following approach described in
- //// the JSON RFC http://www.ietf.org/rfc/rfc4627.txt:
- ////
- //// Since the first two characters of a JSON text will always be ASCII
- //// characters [RFC0020], it is possible to determine whether an octet
- //// stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
- //// at the pattern of nulls in the first four octets.
- ////
- //// 00 00 00 xx UTF-32BE
- //// 00 xx 00 xx UTF-16BE
- //// xx 00 00 00 UTF-32LE
- //// xx 00 xx 00 UTF-16LE
- //// xx xx xx xx UTF-8
- ////
- //// - parameter header: The front Slice of data being read and evaluated.
- //// - returns: A tuple containing the detected Unicode encoding and the lenght of the byte order mark.
- static func detectEncoding(_ header: RandomAccessSlice>) -> ByteStreamPrefixInformation {
-
- guard let prefix = prefixFromHeader(header) else {
- return (.utf8, 0)
- }
-
- if let prefixInfo = JSONEncodingDetector.encodingFromBOM(prefix) {
- return prefixInfo
- } else {
- switch prefix {
- case(0, 0, 0?, _):
- return (.utf32BE, 0)
- case(_, 0, 0?, 0?):
- return (.utf32LE, 0)
- case (0, _, 0?, _), (0, _, _, _):
- return (.utf16BE, 0)
- case (_, 0, _, 0?), (_, 0, _, _):
- return (.utf16LE, 0)
- default:
- return (.utf8, 0)
- }
- }
- }
-
- private typealias EncodingBytePrefix = (UInt8, UInt8, UInt8?, UInt8?)
-
- private static func prefixFromHeader(_ header: RandomAccessSlice>) -> EncodingBytePrefix? {
- if header.count >= 4 {
- return(header[0], header[1], header[2], header[3])
- } else if header.count >= 2 {
- return (header[0], header[1], nil, nil)
- }
- return nil
- }
-
- private static func encodingFromBOM(_ prefix: EncodingBytePrefix) -> ByteStreamPrefixInformation? {
- switch prefix {
- case(0xFE, 0xFF, _, _):
- return (.utf16BE, 2)
- case(0x00, 0x00, 0xFE?, 0xFF?):
- return (.utf32BE, 4)
- case(0xEF, 0xBB, 0xBF?, _):
- return (.utf8, 3)
- case(0xFF, 0xFE, 0?, 0?):
- return (.utf32LE, 4)
- case(0xFF, 0xFE, _, _):
- return (.utf16LE, 2)
- default:
- return nil
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONLiteralConvertible.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONLiteralConvertible.swift
deleted file mode 100755
index 885428818..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONLiteralConvertible.swift
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// JSONLiteralConvertible.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 5/11/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-// MARK: - ArrayLiteralConvertible
-
-extension JSON: ExpressibleByArrayLiteral {
-
- /// Create an instance by copying each element of the `collection` into a
- /// new `Array`.
- public init(_ collection: Collection) where Collection.Iterator.Element == JSON {
- self = .array(Swift.Array(collection))
- }
-
- /// Create an instance initialized with `elements`.
- public init(arrayLiteral elements: JSON...) {
- self.init(elements)
- }
-
-}
-
-// MARK: - DictionaryLiteralConvertible
-
-extension JSON: ExpressibleByDictionaryLiteral {
-
- /// Create an instance by copying each key/value pair of the `pairs` into
- /// a new `Dictionary`.
- public init(_ pairs: Dictionary) where Dictionary.Iterator.Element == (Swift.String, JSON) {
- var dictionary = Swift.Dictionary(minimumCapacity: pairs.underestimatedCount)
- for (key, value) in pairs {
- dictionary[key] = value
- }
- self.init(dictionary)
- }
-
- /// Create an instance initialized with `pairs`.
- public init(dictionaryLiteral pairs: (Swift.String, JSON)...) {
- self.init(pairs)
- }
-
- /// Create an instance initialized to `dictionary`.
- public init(_ dictionary: Swift.Dictionary) {
- self = .dictionary(dictionary)
- }
-}
-
-// MARK: - FloatLiteralConvertible
-
-extension JSON: ExpressibleByFloatLiteral {
-
- /// Create an instance initialized to `Double` `value`.
- public init(_ value: Swift.Double) {
- self = .double(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(floatLiteral value: Swift.Double) {
- self.init(value)
- }
-
-}
-
-// MARK: - IntegerLiteralConvertible
-
-extension JSON: ExpressibleByIntegerLiteral {
-
- /// Create an instance initialized to `Int` by `value`.
- public init(_ value: Swift.Int) {
- self = .int(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(integerLiteral value: Swift.Int) {
- self.init(value)
- }
-
-}
-
-// MARK: - StringLiteralConvertible
-
-extension JSON: ExpressibleByStringLiteral {
-
- /// Create an instance initialized to `String` by `text`.
- public init(_ text: Swift.String) {
- self = .string(text)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(stringLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(extendedGraphemeClusterLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(unicodeScalarLiteral value: StringLiteralType) {
- self.init(value)
- }
-
-}
-
-// MARK: - BooleanLiteralConvertible
-
-extension JSON: ExpressibleByBooleanLiteral {
-
- /// Create an instance initialized to `Bool` by `value`.
- public init(_ value: Swift.Bool) {
- self = .bool(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(booleanLiteral value: Swift.Bool) {
- self.init(value)
- }
-
-}
-
-// MARK: - NilLiteralConvertible
-
-extension JSON: ExpressibleByNilLiteral {
-
- /// Create an instance initialized with `nil`.
- public init(nilLiteral: ()) {
- self = .null
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParser.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParser.swift
deleted file mode 100755
index 31ddaa9bf..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParser.swift
+++ /dev/null
@@ -1,918 +0,0 @@
-//
-// JSONParser.swift
-// Freddy
-//
-// Created by John Gallagher on 4/18/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-import Foundation
-
-private struct Literal {
- static let BACKSLASH = UInt8(ascii: "\\")
- static let BACKSPACE = UInt8(ascii: "\u{0008}")
- static let COLON = UInt8(ascii: ":")
- static let COMMA = UInt8(ascii: ",")
- static let DOUBLE_QUOTE = UInt8(ascii: "\"")
- static let FORMFEED = UInt8(ascii: "\u{000c}")
- static let LEFT_BRACE = UInt8(ascii: "{")
- static let LEFT_BRACKET = UInt8(ascii: "[")
- static let MINUS = UInt8(ascii: "-")
- static let NEWLINE = UInt8(ascii: "\n")
- static let PERIOD = UInt8(ascii: ".")
- static let PLUS = UInt8(ascii: "+")
- static let RETURN = UInt8(ascii: "\r")
- static let RIGHT_BRACE = UInt8(ascii: "}")
- static let RIGHT_BRACKET = UInt8(ascii: "]")
- static let SLASH = UInt8(ascii: "/")
- static let SPACE = UInt8(ascii: " ")
- static let TAB = UInt8(ascii: "\t")
-
- static let a = UInt8(ascii: "a")
- static let b = UInt8(ascii: "b")
- static let c = UInt8(ascii: "c")
- static let d = UInt8(ascii: "d")
- static let e = UInt8(ascii: "e")
- static let f = UInt8(ascii: "f")
- static let l = UInt8(ascii: "l")
- static let n = UInt8(ascii: "n")
- static let r = UInt8(ascii: "r")
- static let s = UInt8(ascii: "s")
- static let t = UInt8(ascii: "t")
- static let u = UInt8(ascii: "u")
-
- static let A = UInt8(ascii: "A")
- static let B = UInt8(ascii: "B")
- static let C = UInt8(ascii: "C")
- static let D = UInt8(ascii: "D")
- static let E = UInt8(ascii: "E")
- static let F = UInt8(ascii: "F")
-
- static let zero = UInt8(ascii: "0")
- static let one = UInt8(ascii: "1")
- static let two = UInt8(ascii: "2")
- static let three = UInt8(ascii: "3")
- static let four = UInt8(ascii: "4")
- static let five = UInt8(ascii: "5")
- static let six = UInt8(ascii: "6")
- static let seven = UInt8(ascii: "7")
- static let eight = UInt8(ascii: "8")
- static let nine = UInt8(ascii: "9")
-}
-
-private let ParserMaximumDepth = 512
-
-
-/// A pure Swift JSON parser. This parser is much faster than the
-/// `NSJSONSerialization`-based parser (due to the overhead of having to
-/// dynamically cast the Objective-C objects to determine their type); however,
-/// it is much newer and has restrictions that the `NSJSONSerialization` parser
-/// does not. Two restrictions in particular are that it requires UTF-8 data as
-/// input and it does not allow trailing commas in arrays or dictionaries.
-public struct JSONParser {
-
- fileprivate enum Sign: Int {
- case positive = 1
- case negative = -1
- }
-
- private let input: UnsafeBufferPointer
- private var loc = 0
- private var depth = 0
-
- fileprivate init(input: UnsafeBufferPointer) {
- self.input = input
- }
-
- /// Decode the root element of the `JSON` stream. This may be any fragment
- /// or a structural element, per RFC 7159.
- ///
- /// The beginning bytes are used to determine the stream's encoding.
- /// `JSONParser` currently only supports UTF-8 encoding, with or without
- /// a byte-order mark.
- ///
- /// - throws: `JSONParser.Error` for any decoding failures, including a
- /// source location if needed.
- public mutating func parse() throws -> JSON {
- try guardAgainstUnsupportedEncodings()
- let value = try parseValue()
- skipWhitespace()
- guard loc == input.count else {
- throw Error.endOfStreamGarbage(offset: loc)
- }
- return value
- }
-
- private mutating func parseValue() throws -> JSON {
- guard depth <= ParserMaximumDepth else {
- throw Error.exceededNestingLimit(offset: loc)
- }
-
- guard input.count > 0 else {
- throw Error.endOfStreamUnexpected
- }
-
- advancing: while loc < input.count {
- do {
- switch input[loc] {
- case Literal.LEFT_BRACKET:
- depth += 1
- defer { depth -= 1 }
- return try decodeArray()
-
- case Literal.LEFT_BRACE:
- depth += 1
- defer { depth -= 1 }
- return try decodeObject()
-
- case Literal.DOUBLE_QUOTE:
- return try decodeString()
-
- case Literal.f:
- return try decodeFalse()
-
- case Literal.n:
- return try decodeNull()
-
- case Literal.t:
- return try decodeTrue()
-
- case Literal.MINUS:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .leadingMinus))
-
- case Literal.zero:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .leadingZero))
-
- case Literal.one...Literal.nine:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .preDecimalDigits))
-
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = (loc + 1)
-
- default:
- break advancing
- }
- } catch let InternalError.numberOverflow(offset: start) {
- return try decodeNumberAsString(from: start)
- }
- }
- if loc < input.count {
- throw Error.valueInvalid(offset: loc, character: UnicodeScalar(input[loc]))
- } else {
- throw Error.endOfStreamUnexpected
- }
- }
-
- private mutating func skipWhitespace() {
- while loc < input.count {
- switch input[loc] {
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = (loc + 1)
- default:
- return
- }
- }
- }
-
- private mutating func guardAgainstUnsupportedEncodings() throws {
- let header = input.prefix(4)
- let encodingPrefixInformation = JSONEncodingDetector.detectEncoding(header)
- guard JSONEncodingDetector.supportedEncodings.contains(encodingPrefixInformation.encoding) else {
- throw Error.invalidUnicodeStreamEncoding(detectedEncoding: encodingPrefixInformation.encoding)
- }
- loc = loc.advanced(by: encodingPrefixInformation.byteOrderMarkLength)
- }
-
- private mutating func decodeNull() throws -> JSON {
- guard input.index(loc, offsetBy: 3, limitedBy: input.count) != input.count else {
- throw Error.literalNilMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.u
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.l {
- throw Error.literalNilMisspelled(offset: loc)
- }
-
- loc += 4
- return .null
- }
-
- private mutating func decodeTrue() throws -> JSON {
- guard input.index(loc, offsetBy: 3, limitedBy: input.count) != input.count else {
- throw Error.literalNilMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.r
- || input[loc+2] != Literal.u
- || input[loc+3] != Literal.e {
- throw Error.literalTrueMisspelled(offset: loc)
- }
-
- loc += 4
- return .bool(true)
- }
-
- private mutating func decodeFalse() throws -> JSON {
- guard input.index(loc, offsetBy: 4, limitedBy: input.count) != input.count else {
- throw Error.literalNilMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.a
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.s
- || input[loc+4] != Literal.e {
- throw Error.literalFalseMisspelled(offset: loc)
- }
-
- loc += 5
- return .bool(false)
- }
-
- private var stringDecodingBuffer = [UInt8]()
- private mutating func decodeString() throws -> JSON {
- loc = (loc + 1)
- stringDecodingBuffer.removeAll(keepingCapacity: true)
- while loc < input.count {
- switch input[loc] {
- case Literal.BACKSLASH:
- loc = (loc + 1)
- switch input[loc] {
- case Literal.DOUBLE_QUOTE: stringDecodingBuffer.append(Literal.DOUBLE_QUOTE)
- case Literal.BACKSLASH: stringDecodingBuffer.append(Literal.BACKSLASH)
- case Literal.SLASH: stringDecodingBuffer.append(Literal.SLASH)
- case Literal.b: stringDecodingBuffer.append(Literal.BACKSPACE)
- case Literal.f: stringDecodingBuffer.append(Literal.FORMFEED)
- case Literal.r: stringDecodingBuffer.append(Literal.RETURN)
- case Literal.t: stringDecodingBuffer.append(Literal.TAB)
- case Literal.n: stringDecodingBuffer.append(Literal.NEWLINE)
- case Literal.u:
- loc = (loc + 1)
- try readUnicodeEscape(start: loc - 2)
-
- // readUnicodeEscape() advances loc on its own, so we'll `continue` now
- // to skip the typical "advance past this character" for all the other escapes
- continue
-
- default:
- throw Error.controlCharacterUnrecognized(offset: loc)
- }
- loc = (loc + 1)
-
- case Literal.DOUBLE_QUOTE:
- loc = (loc + 1)
- stringDecodingBuffer.append(0)
-
- let string = stringDecodingBuffer.withUnsafeBufferPointer {
- String(cString: UnsafePointer($0.baseAddress!))
- }
-
- return .string(string)
-
- case let other:
- stringDecodingBuffer.append(other)
- loc = (loc + 1)
- }
- }
-
- throw Error.endOfStreamUnexpected
- }
-
- private mutating func readCodeUnit() -> UInt16? {
- guard loc + 4 <= input.count else {
- return nil
- }
- var codeUnit: UInt16 = 0
- for c in input[loc.. JSON {
- let start = loc
- loc = (loc + 1)
- var items = [JSON]()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACKET {
- loc = (loc + 1)
- return .array(items)
- }
-
- if !items.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.collectionMissingSeparator(offset: start)
- }
- loc = (loc + 1)
- }
-
- items.append(try parseValue())
- }
-
- throw Error.endOfStreamUnexpected
- }
-
- // Decoding objects can be recursive, so we have to keep more than one
- // buffer around for building up key/value pairs (to reduce allocations
- // when parsing large JSON documents).
- //
- // Rough estimate of the difference between this and using a fresh
- // [(String,JSON)] for the `pairs` variable in decodeObject() below is
- // about 12% on an iPhone 5.
- private struct DecodeObjectBuffers {
- var buffers = [[(String,JSON)]]()
-
- mutating func getBuffer() -> [(String,JSON)] {
- if !buffers.isEmpty {
- var buffer = buffers.removeLast()
- buffer.removeAll(keepingCapacity: true)
- return buffer
- }
- return [(String,JSON)]()
- }
-
- mutating func putBuffer(_ buffer: [(String,JSON)]) {
- buffers.append(buffer)
- }
- }
-
- private var decodeObjectBuffers = DecodeObjectBuffers()
-
- private mutating func decodeObject() throws -> JSON {
- let start = loc
- loc = (loc + 1)
- var pairs = decodeObjectBuffers.getBuffer()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACE {
- loc = (loc + 1)
- var obj = [String:JSON](minimumCapacity: pairs.count)
- for (k, v) in pairs {
- obj[k] = v
- }
- decodeObjectBuffers.putBuffer(pairs)
- return .dictionary(obj)
- }
-
- if !pairs.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.collectionMissingSeparator(offset: start)
- }
- loc = (loc + 1)
-
- skipWhitespace()
- }
-
- guard loc < input.count && input[loc] == Literal.DOUBLE_QUOTE else {
- throw Error.dictionaryMissingKey(offset: start)
- }
-
- let key = try decodeString().getString()
- skipWhitespace()
-
- guard loc < input.count && input[loc] == Literal.COLON else {
- throw Error.collectionMissingSeparator(offset: start)
- }
- loc = (loc + 1)
-
- pairs.append((key, try parseValue()))
- }
-
- throw Error.endOfStreamUnexpected
- }
-
- private mutating func decodeIntegralValue(_ parser: NumberParser) throws -> JSON {
- var sign = Sign.positive
- var parser = parser
- var value = 0
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .done {
- switch parser.state {
- case .leadingMinus:
- sign = .negative
- try parser.parseNegative()
-
- case .leadingZero:
- parser.parseLeadingZero()
-
- case .preDecimalDigits:
- try parser.parsePreDecimalDigits { c in
- guard case let (exponent, false) = Int.multiplyWithOverflow(10, value) else {
- throw InternalError.numberOverflow(offset: parser.start)
- }
-
- guard case let (newValue, false) = Int.addWithOverflow(exponent, Int(c - Literal.zero)) else {
- throw InternalError.numberOverflow(offset: parser.start)
- }
-
- value = newValue
- }
-
- case .decimal, .exponent:
- return try detectingFloatingPointErrors(start: parser.start) {
- try decodeFloatingPointValue(parser, sign: sign, value: Double(value))
- }
-
- case .postDecimalDigits, .exponentSign, .exponentDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .done:
- fatalError("impossible condition")
- }
- }
-
- guard case let (signedValue, false) = Int.multiplyWithOverflow(sign.rawValue, value) else {
- throw InternalError.numberOverflow(offset: parser.start)
- }
-
- loc = parser.loc
- return .int(signedValue)
- }
-
- private mutating func decodeFloatingPointValue(_ parser: NumberParser, sign: Sign, value: Double) throws -> JSON {
- var parser = parser
- var value = value
- var exponentSign = Sign.positive
- var exponent = Double(0)
- var position = 0.1
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .done {
- switch parser.state {
- case .leadingMinus, .leadingZero, .preDecimalDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .decimal:
- try parser.parseDecimal()
-
- case .postDecimalDigits:
- parser.parsePostDecimalDigits { c in
- value += position * Double(c - Literal.zero)
- position /= 10
- }
-
- case .exponent:
- exponentSign = try parser.parseExponent()
-
- case .exponentSign:
- try parser.parseExponentSign()
-
- case .exponentDigits:
- parser.parseExponentDigits { c in
- exponent = exponent * 10 + Double(c - Literal.zero)
- }
-
- case .done:
- fatalError("impossible condition")
- }
- }
-
- loc = parser.loc
- return .double(Double(sign.rawValue) * value * pow(10, Double(exponentSign.rawValue) * exponent))
- }
-
-
- private mutating func decodeNumberAsString(from position: Int) throws -> JSON {
- var parser: NumberParser = {
- let state: NumberParser.State
- switch input[position] {
- case Literal.MINUS: state = .leadingMinus
- case Literal.zero: state = .leadingZero
- case Literal.one...Literal.nine: state = .preDecimalDigits
- default:
- fatalError("Internal error: decodeNumber called on not-a-number")
- }
- return NumberParser(loc: position, input: input, state: state)
- }()
-
- stringDecodingBuffer.removeAll(keepingCapacity: true)
-
- while true {
- switch parser.state {
- case .leadingMinus:
- try parser.parseNegative()
- stringDecodingBuffer.append(Literal.MINUS)
-
- case .leadingZero:
- parser.parseLeadingZero()
- stringDecodingBuffer.append(Literal.zero)
-
- case .preDecimalDigits:
- parser.parsePreDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .decimal:
- try parser.parseDecimal()
- stringDecodingBuffer.append(Literal.PERIOD)
-
- case .postDecimalDigits:
- parser.parsePostDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .exponent:
- stringDecodingBuffer.append(input[parser.loc])
- _ = try parser.parseExponent()
-
- case .exponentSign:
- stringDecodingBuffer.append(input[parser.loc])
- try parser.parseExponentSign()
-
- case .exponentDigits:
- parser.parseExponentDigits { stringDecodingBuffer.append($0) }
-
- case .done:
- stringDecodingBuffer.append(0)
- let string = stringDecodingBuffer.withUnsafeBufferPointer {
- String(cString: UnsafePointer($0.baseAddress!))
- }
-
- loc = parser.loc
- return .string(string)
- }
- }
- }
-
- private func detectingFloatingPointErrors(start loc: Int, _ f: () throws -> T) throws -> T {
- let flags = FE_UNDERFLOW | FE_OVERFLOW
- feclearexcept(flags)
- let value = try f()
- guard fetestexcept(flags) == 0 else {
- throw InternalError.numberOverflow(offset: loc)
- }
- return value
- }
-}
-
-private struct NumberParser {
- enum State {
- case leadingMinus
- case leadingZero
- case preDecimalDigits
- case decimal
- case postDecimalDigits
- case exponent
- case exponentSign
- case exponentDigits
- case done
- }
-
- let start: Int
- var loc = 0
- var state: State
- let input: UnsafeBufferPointer
-
- init(loc: Int, input: UnsafeBufferPointer, state: State) {
- assert(loc < input.count, "Invalid input to NumberParser")
- self.start = loc
- self.loc = loc
- self.input = input
- self.state = state
- }
-
- mutating func parseNegative() throws {
- assert(state == .leadingMinus, "Unexpected state entering parseNegative")
-
- loc = (loc + 1)
- guard loc < input.count else {
- throw JSONParser.Error.endOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero:
- state = .leadingZero
-
- case Literal.one...Literal.nine:
- state = .preDecimalDigits
-
- default:
- throw JSONParser.Error.numberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseLeadingZero() {
- assert(state == .leadingZero, "Unexpected state entering parseLeadingZero")
-
- loc = (loc + 1)
- guard loc < input.count else {
- state = .done
- return
- }
-
- switch input[loc] {
- case Literal.PERIOD:
- state = .decimal
-
- case Literal.e, Literal.E:
- state = .exponent
-
- default:
- state = .done
- }
- }
-
- mutating func parsePreDecimalDigits(f: (UInt8) throws -> Void) rethrows {
- assert(state == .preDecimalDigits, "Unexpected state entering parsePreDecimalDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = (loc + 1)
-
- case Literal.PERIOD:
- state = .decimal
- return
-
- case Literal.e, Literal.E:
- state = .exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .done
- }
-
- mutating func parseDecimal() throws {
- assert(state == .decimal, "Unexpected state entering parseDecimal")
- loc = (loc + 1)
- guard loc < input.count else {
- throw JSONParser.Error.endOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .postDecimalDigits
-
- default:
- throw JSONParser.Error.numberMissingFractionalDigits(offset: start)
- }
- }
-
- mutating func parsePostDecimalDigits(f: (UInt8) throws -> Void) rethrows {
- assert(state == .postDecimalDigits, "Unexpected state entering parsePostDecimalDigits")
-
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = (loc + 1)
-
- case Literal.e, Literal.E:
- state = .exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .done
- }
-
- mutating func parseExponent() throws -> JSONParser.Sign {
- assert(state == .exponent, "Unexpected state entering parseExponent")
-
- loc = (loc + 1)
- guard loc < input.count else {
- throw JSONParser.Error.endOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .exponentDigits
-
- case Literal.PLUS:
- state = .exponentSign
-
- case Literal.MINUS:
- state = .exponentSign
- return .negative
-
- default:
- throw JSONParser.Error.numberSymbolMissingDigits(offset: start)
- }
-
- return .positive
- }
-
- mutating func parseExponentSign() throws {
- assert(state == .exponentSign, "Unexpected state entering parseExponentSign")
- loc = (loc + 1)
- guard loc < input.count else {
- throw JSONParser.Error.endOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .exponentDigits
-
- default:
- throw JSONParser.Error.numberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseExponentDigits(f: (UInt8) throws -> Void) rethrows {
- assert(state == .exponentDigits, "Unexpected state entering parseExponentDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = (loc + 1)
-
- default:
- break advancing
- }
- }
-
- state = .done
- }
-}
-
-public extension JSONParser {
-
- /// Creates a `JSONParser` ready to parse UTF-8 encoded `Data`.
- ///
- /// If the data is mutable, it is copied before parsing. The data's lifetime
- /// is extended for the duration of parsing.
- @available(*, unavailable, message: "Replaced with parse(utf8:)")
- init(utf8Data inData: Data) {
- fatalError("unavailable code cannot be executed")
- }
-
- /// Creates a `JSONParser` from the code units represented by the `string`.
- ///
- /// The synthesized string is lifetime-extended for the duration of parsing.
- @available(*, unavailable, message: "Replaced with parse(utf8:)")
- init(string: String) {
- fatalError("unavailable code cannot be executed")
- }
-
- /// Creates an instance of `JSON` from UTF-8 encoded `data`.
- static func parse(utf8 data: Data) throws -> JSON {
- return try data.withUnsafeBytes { (ptr: UnsafePointer) -> JSON in
- let buffer = UnsafeBufferPointer(start: ptr, count: data.count)
- var parser = JSONParser(input: buffer)
- return try parser.parse()
- }
- }
-
- /// Creates an instance of `JSON` from `string`.
- static func parse(_ string: String) throws -> JSON {
- return try string.utf8CString.withUnsafeBufferPointer { (nulTerminatedBuffer) throws -> JSON in
- return try nulTerminatedBuffer.baseAddress!.withMemoryRebound(to: UInt8.self, capacity: nulTerminatedBuffer.count) { (utf8Base) throws -> JSON in
- // don't want to include the nul termination in the buffer - trim it off
- let buffer = UnsafeBufferPointer(start: utf8Base, count: nulTerminatedBuffer.count - 1)
- var parser = JSONParser(input: buffer)
- return try parser.parse()
- }
- }
- }
-
-}
-
-extension JSONParser: JSONParserType {
-
- /// Creates an instance of `JSON` from UTF-8 encoded `Data`.
- /// - parameter data: An instance of `Data` to parse `JSON` from.
- /// - throws: Any `JSONParser.Error` that arises during decoding.
- /// - seealso: JSONParser.parse()
- public static func createJSON(from data: Data) throws -> JSON {
- return try parse(utf8: data)
- }
-
-}
-
-// MARK: - Errors
-
-extension JSONParser {
-
- /// Enumeration describing possible errors that occur while parsing a JSON
- /// document. Most errors include an associated `offset`, representing the
- /// offset into the UTF-8 characters making up the document where the error
- /// occurred.
- public enum Error: Swift.Error {
- /// The parser ran out of data prematurely. This usually means a value
- /// was not escaped, such as a string literal not ending with a double
- /// quote.
- case endOfStreamUnexpected
-
- /// Unexpected non-whitespace data was left around `offset` after
- /// parsing all valid JSON.
- case endOfStreamGarbage(offset: Int)
-
- /// Too many nested objects or arrays occured at the literal started
- /// around `offset`.
- case exceededNestingLimit(offset: Int)
-
- /// A `character` was not a valid start of a value around `offset`.
- case valueInvalid(offset: Int, character: UnicodeScalar)
-
- /// Badly-formed Unicode escape sequence at `offset`. A Unicode escape
- /// uses the text "\u" followed by 4 hex digits, such as "\uF09F\uA684"
- /// to represent U+1F984, "UNICORN FACE".
- case unicodeEscapeInvalid(offset: Int)
-
- /// Badly-formed control character around `offset`. JSON supports
- /// backslash-escaped double quotes, slashes, whitespace control codes,
- /// and Unicode escape sequences.
- case controlCharacterUnrecognized(offset: Int)
-
- /// Invalid token, expected `null` around `offset`
- case literalNilMisspelled(offset: Int)
-
- /// Invalid token, expected `true` around `offset`
- case literalTrueMisspelled(offset: Int)
-
- /// Invalid token, expected `false` around `offset`
- case literalFalseMisspelled(offset: Int)
-
- /// Badly-formed collection at given `offset`, expected `,` or `:`
- case collectionMissingSeparator(offset: Int)
-
- /// While parsing an object literal, a value was found without a key
- /// around `offset`. The start of a string literal was expected.
- case dictionaryMissingKey(offset: Int)
-
- /// Badly-formed number with no digits around `offset`. After a decimal
- /// point, a number must include some number of digits.
- case numberMissingFractionalDigits(offset: Int)
-
- /// Badly-formed number with symbols ("-" or "e") but no following
- /// digits around `offset`.
- case numberSymbolMissingDigits(offset: Int)
-
- /// Supplied data is encoded in an unsupported format.
- case invalidUnicodeStreamEncoding(detectedEncoding: JSONEncodingDetector.Encoding)
- }
-
- fileprivate enum InternalError: Swift.Error {
- /// Attempted to parse an integer outside the range of [Int.min, Int.max]
- /// or a double outside the range of representable doubles. Note that
- /// for doubles, this could be an overflow or an underflow - we don't
- /// get enough information from Swift here to know which it is. The number
- /// causing the overflow/underflow began at `offset`.
- case numberOverflow(offset: Int)
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParsing.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParsing.swift
deleted file mode 100755
index 0be146cf5..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONParsing.swift
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// JSONParsing.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-// MARK: - Deserialize JSON
-
-/// Protocol describing a backend parser that can produce `JSON` from `Data`.
-public protocol JSONParserType {
-
- /// Creates an instance of `JSON` from `Data`.
- /// - parameter data: An instance of `Data` to use to create `JSON`.
- /// - throws: An error that may arise from calling `JSONObjectWithData(_:options:)` on `NSJSONSerialization` with the given data.
- /// - returns: An instance of `JSON`.
- static func createJSON(from data: Data) throws -> JSON
-
-}
-
-extension JSON {
-
- /// Create `JSON` from UTF-8 `data`. By default, parses using the
- /// Swift-native `JSONParser` backend.
- public init(data: Data, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSON(from: data)
- }
-
- /// Create `JSON` from UTF-8 `string`.
- public init(jsonString: Swift.String, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSON(from: jsonString.data(using: Swift.String.Encoding.utf8) ?? Data())
- }
-}
-
-// MARK: - NSJSONSerialization
-
-extension JSONSerialization: JSONParserType {
-
- // MARK: Decode Data
-
- /// Use the built-in, Objective-C based JSON parser to create `JSON`.
- /// - parameter data: An instance of `Data`.
- /// - returns: An instance of `JSON`.
- /// - throws: An error that may arise if the `Data` cannot be parsed into an object.
- public static func createJSON(from data: Data) throws -> JSON {
- return makeJSON(with: try JSONSerialization.jsonObject(with: data, options: []))
- }
-
- // MARK: Make JSON
-
- /// Makes a `JSON` object by matching its argument to a case in the `JSON` enum.
- /// - parameter object: The instance of `Any` returned from serializing the JSON.
- /// - returns: An instance of `JSON` matching the JSON given to the function.
- private static func makeJSON(with object: Any) -> JSON {
- switch object {
- case let n as NSNumber:
- let numberType = CFNumberGetType(n)
- switch numberType {
- case .charType:
- return .bool(n.boolValue)
-
- case .shortType, .intType, .longType, .cfIndexType, .nsIntegerType, .sInt8Type, .sInt16Type, .sInt32Type:
- return .int(n.intValue)
-
- case .sInt64Type, .longLongType /* overflows 32-bit Int */:
- #if /* 32-bit arch */ arch(arm) || arch(i386)
- // Why double, when the Freddy parser would bump to String?
- //
- // Returning Double avoids making the type depend on whether you're running
- // 32-bit or 64-bit code when using the NSJSONSerialization parser.
- // NSJSONSerialization appears to bump numbers larger than Int.max to Double on
- // 64-bit platforms but use .SInt64Type on 32-bit platforms.
- // If we returned a String here, you'd get a String value on 32-bit,
- // but a Double value on 64-bit. Instead, we return Double.
- //
- // This means that, if you switch parsers,
- // you'll have to switch from .double to .string for pulling out
- // overflowing values, but if you stick with a single parser,
- // you at least won't have architecture-dependent lookups!
- return .double(n.doubleValue)
- #else
- return .int(n.intValue)
- #endif
-
- case .float32Type, .float64Type, .floatType, .doubleType, .cgFloatType:
- return .double(n.doubleValue)
- }
-
- case let arr as [Any]:
- return makeJSONArray(arr)
-
- case let dict as [Swift.String: Any]:
- return makeJSONDictionary(dict)
-
- case let s as Swift.String:
- return .string(s)
-
- default:
- return .null
- }
- }
-
- // MARK: Make a JSON Array
-
- /// Makes a `JSON` array from the object passed in.
- /// - parameter jsonArray: The array to transform into a `JSON`.
- /// - returns: An instance of `JSON` matching the array.
- private static func makeJSONArray(_ jsonArray: [Any]) -> JSON {
- return .array(jsonArray.map(makeJSON))
- }
-
- // MARK: Make a JSON Dictionary
-
- /// Makes a `JSON` dictionary from the Cocoa dictionary passed in.
- /// - parameter jsonDict: The dictionary to transform into `JSON`.
- /// - returns: An instance of `JSON` matching the dictionary.
- private static func makeJSONDictionary(_ jsonDict: [Swift.String: Any]) -> JSON {
- return JSON(jsonDict.lazy.map { (key, value) in
- (key, makeJSON(with: value))
- })
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSerializing.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSerializing.swift
deleted file mode 100755
index 85a6f7133..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSerializing.swift
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (C) 2016 Big Nerd Ranch, Inc. Licensed under the MIT license WITHOUT ANY WARRANTY.
-
-import Foundation
-
-// MARK: - Serialize JSON
-
-extension JSON {
-
- /// Attempt to serialize `JSON` into an `Data`.
- /// - returns: A byte-stream containing the `JSON` ready for wire transfer.
- /// - throws: Errors that arise from `JSONSerialization`.
- /// - see: Foundation.JSONSerialization
- public func serialize() throws -> Data {
- return try JSONSerialization.data(withJSONObject: toJSONSerializationValue(), options: [])
- }
-
- /// Attempt to serialize `JSON` into a `String`.
- /// - returns: A `String` containing the `JSON`.
- /// - throws: A `JSON.Error.StringSerializationError` or errors that arise from `JSONSerialization`.
- /// - see: Foundation.JSONSerialization
- public func serializeString() throws -> String {
- let data = try self.serialize()
- guard let json = String(data: data, encoding: String.Encoding.utf8) else {
- throw Error.stringSerializationError
- }
- return json
- }
-
- /// A function to help with the serialization of `JSON`.
- /// - returns: An `Any` suitable for `JSONSerialization`'s use.
- private func toJSONSerializationValue() -> Any {
- switch self {
- case .array(let jsonArray):
- return jsonArray.map { $0.toJSONSerializationValue() }
- case .dictionary(let jsonDictionary):
- var cocoaDictionary = Swift.Dictionary(minimumCapacity: jsonDictionary.count)
- for (key, json) in jsonDictionary {
- cocoaDictionary[key] = json.toJSONSerializationValue()
- }
- return cocoaDictionary
- case .string(let str):
- return str
- case .double(let num):
- return NSNumber(value: num)
- case .int(let int):
- return NSNumber(value: int)
- case .bool(let b):
- return NSNumber(value: b)
- case .null:
- return NSNull()
- }
-
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSubscripting.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSubscripting.swift
deleted file mode 100755
index 6d1bd3ef3..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/JSONSubscripting.swift
+++ /dev/null
@@ -1,613 +0,0 @@
-//
-// JSONSubscripting.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 8/15/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-// MARK: JSONPathType
-
-/// A protocol used to define a path within an instance of `JSON` that leads to some desired value.
-///
-/// A custom type, such as a `RawRepresentable` enum, may be made to conform to `JSONPathType`
-/// and used with the subscript APIs.
-public protocol JSONPathType {
- /// Use `self` to key into a `dictionary`.
- ///
- /// Unlike Swift dictionaries, failing to find a value for a key should throw
- /// an error rather than convert to `nil`.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func value(in dictionary: [String : JSON]) throws -> JSON
-
- /// Use `self` to index into an `array`.
- ///
- /// Unlike Swift arrays, attempting to index outside the collection's bounds
- /// should throw an error rather than crash.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func value(in array: [JSON]) throws -> JSON
-}
-
-extension JSONPathType {
-
- /// The default behavior for keying into a dictionary is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func value(in dictionary: [String : JSON]) throws -> JSON {
- throw JSON.Error.unexpectedSubscript(type: Self.self)
- }
-
- /// The default behavior for indexing into an array is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func value(in array: [JSON]) throws -> JSON {
- throw JSON.Error.unexpectedSubscript(type: Self.self)
- }
-
-}
-
-extension String: JSONPathType {
-
- /// A method used to retrieve a value from a given dictionary for a specific key.
- /// - parameter dictionary: A `Dictionary` with `String` keys and `JSON` values.
- /// - throws: `.KeyNotFound` with an associated value of `self`, where `self` is a `String`,
- /// should the key not be present within the `JSON`.
- /// - returns: The `JSON` value associated with the given key.
- public func value(in dictionary: [String : JSON]) throws -> JSON {
- guard let next = dictionary[self] else {
- throw JSON.Error.keyNotFound(key: self)
- }
- return next
- }
-
-}
-
-extension Int: JSONPathType {
-
- /// A method used to retrieve a value from a given array for a specific index.
- /// - parameter array: An `Array` of `JSON`.
- /// - throws: `.IndexOutOfBounds` with an associated value of `self`, where `self` is an `Int`,
- /// should the index not be within the valid range for the array of `JSON`.
- /// - returns: The `JSON` value found at the given index.
- public func value(in array: [JSON]) throws -> JSON {
- guard case array.indices = self else {
- throw JSON.Error.indexOutOfBounds(index: self)
- }
- return array[self]
- }
-
-}
-
-// MARK: - Subscripting core
-
-private extension JSON {
-
- enum SubscriptError: Swift.Error {
- case subscriptIntoNull(JSONPathType)
- }
-
- func value(for pathFragment: JSONPathType, detectingNull: Bool) throws -> JSON {
- switch self {
- case .null where detectingNull:
- throw SubscriptError.subscriptIntoNull(pathFragment)
- case let .dictionary(dict):
- return try pathFragment.value(in: dict)
- case let .array(array):
- return try pathFragment.value(in: array)
- default:
- throw Error.unexpectedSubscript(type: type(of: pathFragment))
- }
- }
-
- func value(at path: [JSONPathType], detectingNull: Bool = false) throws -> JSON {
- var result = self
- for pathFragment in path {
- result = try result.value(for: pathFragment, detectingNull: detectingNull)
- }
- return result
- }
-
-}
-
-// MARK: - Subscripting operator
-
-extension JSON {
-
- public subscript(key: String) -> JSON? {
- return try? value(for: key, detectingNull: false)
- }
-
- public subscript(index: Int) -> JSON? {
- return try? value(for: index, detectingNull: false)
- }
-
-}
-
-// MARK: - Simple member unpacking
-
-extension JSON {
-
- /// Attempts to decode into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A given `String` key does not exist inside a
- /// descendant `JSON` dictionary.
- /// * `IndexOutOfBounds`: A given `Int` index is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> Decoded {
- return try Decoded(json: value(at: path))
- }
-
- /// Retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getDouble(at path: JSONPathType...) throws -> Double {
- return try Double(json: value(at: path))
- }
-
- /// Retrieves an `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A numeric `Int`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getInt(at path: JSONPathType...) throws -> Int {
- return try Int(json: value(at: path))
- }
-
- /// Retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A textual `String`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getString(at path: JSONPathType...) throws -> String {
- return try String(json: value(at: path))
- }
-
- /// Retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A truthy `Bool`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getBool(at path: JSONPathType...) throws -> Bool {
- return try Bool(json: value(at: path))
- }
-
- /// Retrieves a `[JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getArray(at path: JSONPathType...) throws -> [JSON] {
- return try JSON.getArray(from: value(at: path))
- }
-
- /// Attempts to decode many values from a descendant JSON array at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`, or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(at:type:)`
- public func decodedArray(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Decoded] {
- return try JSON.decodedArray(from: value(at: path))
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`.
- /// - seealso: `JSON.decode(at:type:)`
- public func getDictionary(at path: JSONPathType...) throws -> [String: JSON] {
- return try JSON.getDictionary(from: value(at: path))
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: A `Dictionary` of `String` keys and decoded values.
- /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)` or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(at:type:)`
- public func decodedDictionary(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [String: Decoded] {
- return try JSON.decodedDictionary(from: value(at: path))
- }
-
-}
-
-// MARK: - NotFound-Or-Null-to-Optional unpacking
-
-extension JSON {
-
- /// An `OptionSetType` used to represent the different options available for subscripting `JSON` with `null` values or missing keys.
- /// * `.NullBecomesNil` - Treat `null` values as `nil`.
- /// * `.MissingKeyBecomesNil` - Treat missing keys as `nil`.
- public struct SubscriptingOptions: OptionSet {
- public let rawValue: Int
- public init(rawValue: Int) {
- self.rawValue = rawValue
- }
-
- /// Treat `null` values as `nil`.
- public static let NullBecomesNil = SubscriptingOptions(rawValue: 1 << 0)
- /// Treat missing keys as `nil`.
- public static let MissingKeyBecomesNil = SubscriptingOptions(rawValue: 1 << 1)
- }
-
- fileprivate func mapOptional(at path: [JSONPathType], alongPath options: SubscriptingOptions, transform: (JSON) throws -> Value) throws -> Value? {
- let detectNull = options.contains(.NullBecomesNil)
- let detectNotFound = options.contains(.MissingKeyBecomesNil)
- var json: JSON?
- do {
- json = try value(at: path, detectingNull: detectNull)
- return try json.map(transform)
- } catch Error.indexOutOfBounds where detectNotFound {
- return nil
- } catch Error.keyNotFound where detectNotFound {
- return nil
- } catch Error.valueNotConvertible where detectNull && json == .null {
- return nil
- } catch SubscriptError.subscriptIntoNull where detectNull {
- return nil
- }
- }
-}
-
-extension JSON {
-
- /// Decodes a `JSON` instance if it is not `.Null`, throws otherwise.
- /// - parameter json: An instance of `JSON`.
- /// - returns: An instance of some type that conforms to `JSONDecodable`.
- /// - throws: `Error.ValueNotConvertible` if the `JSON` instance is `.Null`.
- private static func getDecoded(json: JSON) throws -> Decoded {
- guard json != .null else {
- throw Error.valueNotConvertible(value: json, to: Decoded.self)
- }
- return try Decoded.init(json: json)
- }
-
- /// Optionally decodes into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: A decoded value from the inner JSON if found, or `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decode(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- return try mapOptional(at: path, alongPath: options, transform: JSON.getDecoded)
- }
-
- /// Optionally retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Double` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getDouble(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Double? {
- return try mapOptional(at: path, alongPath: options, transform: Double.init)
- }
-
- /// Optionally retrieves a `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A numeric `Int` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getInt(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Int? {
- return try mapOptional(at: path, alongPath: options, transform: Int.init)
- }
-
- /// Optionally retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A text `String` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getString(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> String? {
- return try mapOptional(at: path, alongPath: options, transform: String.init)
- }
-
- /// Optionally retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A truthy `Bool` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getBool(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Bool? {
- return try mapOptional(at: path, alongPath: options, transform: Bool.init)
- }
-
- /// Optionally retrieves a `[JSON]` from a path into the recieving structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: An `Array` of `JSON` elements if a value could be found,
- /// otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getArray(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [JSON]? {
- return try mapOptional(at: path, alongPath: options, transform: JSON.getArray)
- }
-
- /// Optionally decodes many values from a descendant array at a path into
- /// JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: An `Array` of decoded elements if found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decodedArray(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Decoded]? {
- return try mapOptional(at: path, alongPath: options, transform: JSON.decodedArray)
- }
-
- /// Optionally retrieves a `[String: JSON]` from a path into the recieving
- /// structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Dictionary` of `String` mapping to `JSON` elements if a
- /// value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getDictionary(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [String: JSON]? {
- return try mapOptional(at: path, alongPath: options, transform: JSON.getDictionary)
- }
-
- /// Optionally attempts to decode many values from a descendant object at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the value type to decode with.
- /// - returns: A `Dictionary` of `String` mapping to decoded elements if a
- /// value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decodedDictionary(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [String: Decoded]? {
- return try mapOptional(at: path, alongPath: options, transform: JSON.decodedDictionary)
- }
-
-}
-
-// MARK: - Missing-with-fallback unpacking
-
-extension JSON {
-
- fileprivate func mapOptional(at path: [JSONPathType], fallback: () -> Value, transform: (JSON) throws -> Value) throws -> Value {
- return try mapOptional(at: path, alongPath: .MissingKeyBecomesNil, transform: transform) ?? fallback()
- }
-
- /// Attempts to decode into the returning type from a path into
- /// JSON, or returns a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(at path: JSONPathType..., or fallback: @autoclosure() -> Decoded) throws -> Decoded {
- return try mapOptional(at: path, fallback: fallback, transform: Decoded.init)
- }
-
- /// Retrieves a `Double` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Double` to use when one is missing at the subscript.
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by calling `mapOptional(at:fallback:transform:)`.
- public func getDouble(at path: JSONPathType..., or fallback: @autoclosure() -> Double) throws -> Double {
- return try mapOptional(at: path, fallback: fallback, transform: Double.init)
- }
-
- /// Retrieves an `Int` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Int` to use when one is missing at the subscript.
- /// - returns: A numeric `Int`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getInt(at path: JSONPathType..., or fallback: @autoclosure() -> Int) throws -> Int {
- return try mapOptional(at: path, fallback: fallback, transform: Int.init)
- }
-
- /// Retrieves a `String` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `String` to use when one is missing at the subscript.
- /// - returns: A textual `String`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getString(at path: JSONPathType..., or fallback: @autoclosure() -> String) throws -> String {
- return try mapOptional(at: path, fallback: fallback, transform: String.init)
- }
-
- /// Retrieves a `Bool` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Bool` to use when one is missing at the subscript.
- /// - returns: A truthy `Bool`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getBool(at path: JSONPathType..., or fallback: @autoclosure() -> Bool) throws -> Bool {
- return try mapOptional(at: path, fallback: fallback, transform: Bool.init)
- }
-
- /// Retrieves a `[JSON]` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Array` to use when one is missing at the subscript.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getArray(at path: JSONPathType..., or fallback: @autoclosure() -> [JSON]) throws -> [JSON] {
- return try mapOptional(at: path, fallback: fallback, transform: JSON.getArray)
- }
-
- /// Attempts to decodes many values from a desendant JSON array at a path
- /// into the recieving structure, returning a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Array` to use when one is missing at the subscript.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decodedArray(at path: JSONPathType..., or fallback: @autoclosure() -> [Decoded]) throws -> [Decoded] {
- return try mapOptional(at: path, fallback: fallback, transform: JSON.decodedArray)
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON or a fallback if not
- /// found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: `Dictionary` to use when one is missing at the subscript.
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func getDictionary(at path: JSONPathType..., or fallback: @autoclosure() -> [String: JSON]) throws -> [String: JSON] {
- return try mapOptional(at: path, fallback: fallback, transform: JSON.getDictionary)
- }
-
- /// Attempts to decode many values from a descendant JSON object at a path
- /// into the receiving structure, returning a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript
- /// - returns: A `Dictionary` of `String` mapping to decoded elements.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decodedDictionary(at path: JSONPathType..., or fallback: @autoclosure() -> [String: Decoded]) throws -> [String: Decoded] {
- return try mapOptional(at: path, fallback: fallback, transform: JSON.decodedDictionary)
- }
-
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/main.swift b/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/main.swift
deleted file mode 100644
index 7f715fcbc..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_20161018/test_Freddy/main.swift
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// main.swift
-// test_Freddy
-//
-// Created by nst on 10/08/16.
-// Copyright © 2016 Nicolas Seriot. All rights reserved.
-//
-
-import Foundation
-
-func main() {
-
- guard ProcessInfo.processInfo.arguments.count == 2 else {
- let url = URL(fileURLWithPath: ProcessInfo.processInfo.arguments[0])
- let programName = url.lastPathComponent
- print("Usage: ./\(programName) file.json")
- exit(1)
- }
-
- let path = ProcessInfo.processInfo.arguments[1]
- let url = NSURL.fileURL(withPath:path)
-
- do {
- let data = try Data(contentsOf:url)
- do {
- let o = try JSONParser.parse(utf8: data)
- exit(0)
- } catch {
- exit(1)
- }
-
- } catch let e {
- print("*** CANNOT READ DATA AT \(url)")
- print(e)
- exit(1)
- }
-
-}
-
-main()
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/bin/test_Freddy_2_1_0 b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/bin/test_Freddy_2_1_0
deleted file mode 100755
index 2a6a30c7d..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/bin/test_Freddy_2_1_0 and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.pbxproj
deleted file mode 100644
index 3ed80c199..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,300 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D84ABA1D5B0A1000776402 /* main.swift */; };
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7781D5B75600021630C /* JSON.swift */; };
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7791D5B75600021630C /* JSONDecodable.swift */; };
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77A1D5B75600021630C /* JSONEncodable.swift */; };
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */; };
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */; };
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77D1D5B75600021630C /* JSONParser.swift */; };
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77E1D5B75600021630C /* JSONParsing.swift */; };
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F77F1D5B75600021630C /* JSONSerializing.swift */; };
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F8F7801D5B75600021630C /* JSONSubscripting.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 03D84AB51D5B0A1000776402 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 03D84AB71D5B0A1000776402 /* test_Freddy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_Freddy; sourceTree = BUILT_PRODUCTS_DIR; };
- 03D84ABA1D5B0A1000776402 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
- 03F8F7781D5B75600021630C /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = test_Freddy/JSON.swift; sourceTree = ""; };
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = test_Freddy/JSONDecodable.swift; sourceTree = ""; };
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodable.swift; path = test_Freddy/JSONEncodable.swift; sourceTree = ""; };
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONEncodingDetector.swift; path = test_Freddy/JSONEncodingDetector.swift; sourceTree = ""; };
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = test_Freddy/JSONLiteralConvertible.swift; sourceTree = ""; };
- 03F8F77D1D5B75600021630C /* JSONParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = test_Freddy/JSONParser.swift; sourceTree = ""; };
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = test_Freddy/JSONParsing.swift; sourceTree = ""; };
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = test_Freddy/JSONSerializing.swift; sourceTree = ""; };
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = test_Freddy/JSONSubscripting.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 03D84AB41D5B0A1000776402 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 03D84AAE1D5B0A1000776402 = {
- isa = PBXGroup;
- children = (
- 03F8F7781D5B75600021630C /* JSON.swift */,
- 03F8F7791D5B75600021630C /* JSONDecodable.swift */,
- 03F8F77A1D5B75600021630C /* JSONEncodable.swift */,
- 03F8F77B1D5B75600021630C /* JSONEncodingDetector.swift */,
- 03F8F77C1D5B75600021630C /* JSONLiteralConvertible.swift */,
- 03F8F77D1D5B75600021630C /* JSONParser.swift */,
- 03F8F77E1D5B75600021630C /* JSONParsing.swift */,
- 03F8F77F1D5B75600021630C /* JSONSerializing.swift */,
- 03F8F7801D5B75600021630C /* JSONSubscripting.swift */,
- 03D84AB91D5B0A1000776402 /* test_Freddy */,
- 03D84AB81D5B0A1000776402 /* Products */,
- );
- sourceTree = "";
- };
- 03D84AB81D5B0A1000776402 /* Products */ = {
- isa = PBXGroup;
- children = (
- 03D84AB71D5B0A1000776402 /* test_Freddy */,
- );
- name = Products;
- sourceTree = "";
- };
- 03D84AB91D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXGroup;
- children = (
- 03D84ABA1D5B0A1000776402 /* main.swift */,
- );
- path = test_Freddy;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 03D84AB61D5B0A1000776402 /* test_Freddy */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */;
- buildPhases = (
- 03D84AB31D5B0A1000776402 /* Sources */,
- 03D84AB41D5B0A1000776402 /* Frameworks */,
- 03D84AB51D5B0A1000776402 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = test_Freddy;
- productName = test_Freddy;
- productReference = 03D84AB71D5B0A1000776402 /* test_Freddy */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 03D84AAF1D5B0A1000776402 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0800;
- LastUpgradeCheck = 0800;
- ORGANIZATIONNAME = "Nicolas Seriot";
- TargetAttributes = {
- 03D84AB61D5B0A1000776402 = {
- CreatedOnToolsVersion = 8.0;
- DevelopmentTeam = VBYRKYS73S;
- DevelopmentTeamName = "Nicolas Seriot";
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 03D84AAE1D5B0A1000776402;
- productRefGroup = 03D84AB81D5B0A1000776402 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 03D84AB61D5B0A1000776402 /* test_Freddy */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 03D84AB31D5B0A1000776402 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 03F8F7881D5B75600021630C /* JSONSerializing.swift in Sources */,
- 03F8F7821D5B75600021630C /* JSONDecodable.swift in Sources */,
- 03F8F7851D5B75600021630C /* JSONLiteralConvertible.swift in Sources */,
- 03F8F7871D5B75600021630C /* JSONParsing.swift in Sources */,
- 03F8F7861D5B75600021630C /* JSONParser.swift in Sources */,
- 03F8F7831D5B75600021630C /* JSONEncodable.swift in Sources */,
- 03D84ABB1D5B0A1000776402 /* main.swift in Sources */,
- 03F8F7811D5B75600021630C /* JSON.swift in Sources */,
- 03F8F7891D5B75600021630C /* JSONSubscripting.swift in Sources */,
- 03F8F7841D5B75600021630C /* JSONEncodingDetector.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 03D84ABC1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 03D84ABD1D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 03D84ABF1D5B0A1000776402 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 2.3;
- };
- name = Debug;
- };
- 03D84AC01D5B0A1000776402 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 2.3;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 03D84AB21D5B0A1000776402 /* Build configuration list for PBXProject "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABC1D5B0A1000776402 /* Debug */,
- 03D84ABD1D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 03D84ABE1D5B0A1000776402 /* Build configuration list for PBXNativeTarget "test_Freddy" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03D84ABF1D5B0A1000776402 /* Debug */,
- 03D84AC01D5B0A1000776402 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 03D84AAF1D5B0A1000776402 /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 95e4cc57e..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
deleted file mode 100644
index fcf13a138..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcshareddata/test_Freddy.xcscmblueprint
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
-
- },
- "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : 0,
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : 0
- },
- "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7B3DFA55-F9BF-41D8-8FD5-204D3162EB03",
- "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
- "6ADA245F937D8ED6D99F5A7865E19F5267A169E2" : "dropbox\/JSON\/test_Freddy\/Vendor\/Freddy\/",
- "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A" : "dropbox\/"
- },
- "DVTSourceControlWorkspaceBlueprintNameKey" : "test_Freddy",
- "DVTSourceControlWorkspaceBlueprintVersion" : 204,
- "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "JSON\/test_Freddy\/test_Freddy.xcodeproj",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bignerdranch\/Freddy.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "6ADA245F937D8ED6D99F5A7865E19F5267A169E2"
- },
- {
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "\/Users\/nst\/Dropbox\/dropbox.git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
- "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ED13D74FC1ED9BC322EA1859E5AD7D001676FA6A"
- }
- ]
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 9f4bd58b9..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
deleted file mode 100644
index e31043938..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_Freddy.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index b27bc09bd..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test_Freddy.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 03D84AB61D5B0A1000776402
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSON.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSON.swift
deleted file mode 100755
index c8adae8ca..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSON.swift
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// JSON.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// An enum to describe the structure of JSON.
-public enum JSON {
- /// A case for denoting an array with an associated value of `[JSON]`
- case Array([JSON])
- /// A case for denoting a dictionary with an associated value of `[Swift.String: JSON]`
- case Dictionary([Swift.String: JSON])
- /// A case for denoting a double with an associated value of `Swift.Double`.
- case Double(Swift.Double)
- /// A case for denoting an integer with an associated value of `Swift.Int`.
- case Int(Swift.Int)
- /// A case for denoting a string with an associated value of `Swift.String`.
- case String(Swift.String)
- /// A case for denoting a boolean with an associated value of `Swift.Bool`.
- case Bool(Swift.Bool)
- /// A case for denoting null.
- case Null
-}
-
-// MARK: - Errors
-
-extension JSON {
-
- /// An enum to encapsulate errors that may arise in working with `JSON`.
- public enum Error: ErrorType {
- /// The `index` is out of bounds for a JSON array
- case IndexOutOfBounds(index: Swift.Int)
-
- /// The `key` was not found in the JSON dictionary
- case KeyNotFound(key: Swift.String)
-
- /// The JSON is not subscriptable with `type`
- case UnexpectedSubscript(type: JSONPathType.Type)
-
- /// Unexpected JSON `value` was found that is not convertible `to` type
- case ValueNotConvertible(value: JSON, to: Any.Type)
- }
-
-}
-
-// MARK: - Test Equality
-
-/// Return `true` if `lhs` is equal to `rhs`.
-public func ==(lhs: JSON, rhs: JSON) -> Bool {
- switch (lhs, rhs) {
- case (.Array(let arrL), .Array(let arrR)):
- return arrL == arrR
- case (.Dictionary(let dictL), .Dictionary(let dictR)):
- return dictL == dictR
- case (.String(let strL), .String(let strR)):
- return strL == strR
- case (.Double(let dubL), .Double(let dubR)):
- return dubL == dubR
- case (.Double(let dubL), .Int(let intR)):
- return dubL == Double(intR)
- case (.Int(let intL), .Int(let intR)):
- return intL == intR
- case (.Int(let intL), .Double(let dubR)):
- return Double(intL) == dubR
- case (.Bool(let bL), .Bool(let bR)):
- return bL == bR
- case (.Null, .Null):
- return true
- default:
- return false
- }
-}
-
-extension JSON: Equatable {}
-
-// MARK: - Printing
-
-extension JSON: CustomStringConvertible {
-
- /// A textual representation of `self`.
- public var description: Swift.String {
- switch self {
- case .Array(let arr): return Swift.String(arr)
- case .Dictionary(let dict): return Swift.String(dict)
- case .String(let string): return string
- case .Double(let double): return Swift.String(double)
- case .Int(let int): return Swift.String(int)
- case .Bool(let bool): return Swift.String(bool)
- case .Null: return "null"
- }
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONDecodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONDecodable.swift
deleted file mode 100755
index ff508c9e4..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONDecodable.swift
+++ /dev/null
@@ -1,151 +0,0 @@
-//
-// JSONDecodable.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/24/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-/// A protocol to provide functionality for creating a model object with a `JSON`
-/// value.
-public protocol JSONDecodable {
-
- /// Creates an instance of the model with a `JSON` instance.
- /// - parameter json: An instance of a `JSON` value from which to
- /// construct an instance of the implementing type.
- /// - throws: Any `JSON.Error` for errors derived from inspecting the
- /// `JSON` value, or any other error involved in decoding.
- init(json: JSON) throws
-
-}
-
-extension Double: JSONDecodable {
-
- /// An initializer to create an instance of `Double` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Double` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- switch json {
- case let .Double(double):
- self = double
- case let .Int(int):
- self = Swift.Double(int)
- default:
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Double)
- }
- }
-
-}
-
-extension Int: JSONDecodable {
-
- /// An initializer to create an instance of `Int` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Int` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- switch json {
- case let .Double(double) where double <= Double(Swift.Int.max):
- self = Swift.Int(double)
- case let .Int(int):
- self = int
- default:
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Int)
- }
- }
-
-}
-
-extension String: JSONDecodable {
-
- /// An initializer to create an instance of `String` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `String` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- guard case let .String(string) = json else {
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.String)
- }
- self = string
- }
-
-}
-
-extension Bool: JSONDecodable {
-
- /// An initializer to create an instance of `Bool` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `Bool` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- guard case let .Bool(bool) = json else {
- throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Bool)
- }
- self = bool
- }
-
-}
-
-extension RawRepresentable where RawValue: JSONDecodable {
-
- /// An initializer to create an instance of `RawRepresentable` from a `JSON` value.
- /// - parameter json: An instance of `JSON`.
- /// - throws: The initializer will throw an instance of `JSON.Error` if
- /// an instance of `RawRepresentable` cannot be created from the `JSON` value that was
- /// passed to this initializer.
- public init(json: JSON) throws {
- let raw = try json.decode(type: RawValue.self)
- guard let value = Self(rawValue: raw) else {
- throw JSON.Error.ValueNotConvertible(value: json, to: Self.self)
- }
- self = value
- }
-}
-
-internal extension JSON {
-
- /// Retrieves a `[JSON]` from the JSON.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getArray(json: JSON) throws -> [JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Array.
- guard case let .Array(array) = json else {
- throw Error.ValueNotConvertible(value: json, to: Swift.Array)
- }
- return array
- }
-
- /// Retrieves a `[String: JSON]` from the JSON.
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- static func getDictionary(json: JSON) throws -> [Swift.String: JSON] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- guard case let .Dictionary(dictionary) = json else {
- throw Error.ValueNotConvertible(value: json, to: Swift.Dictionary)
- }
- return dictionary
- }
-
- /// Attempts to decode many values from a descendant JSON array at a path
- /// into JSON.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An `Array` of decoded elements
- /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`, as
- /// well as any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- static func getArrayOf(json: JSON) throws -> [Decoded] {
- // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
- // This implementation also doesn't do the `type = Type.self` trick.
- return try getArray(json).map(Decoded.init)
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodable.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodable.swift
deleted file mode 100755
index 480c57bce..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodable.swift
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// JSONEncodable.swift
-// Freddy
-//
-// Created by Matthew Mathias on 1/4/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-/// A protocol to facilitate encoding and decoding of `JSON`.
-public protocol JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON`.
- /// - Note: If conforming to `JSONEncodable` with a custom type of your own, you should return an instance of
- /// `JSON.Dictionary`.
- func toJSON() -> JSON
-}
-
-extension Array where Element: JSONEncodable {
- /// Converts an instance of `Array` whose elements conform to `JSONEncodable` to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Array`.
- public func toJSON() -> JSON {
- let arrayOfJSON = self.map { $0.toJSON() }
- return .Array(arrayOfJSON)
- }
-}
-
-extension Dictionary where Value: JSONEncodable {
- /// Converts an instance of `Dictionary` whose values conform to `JSONEncodable` to `JSON`. The keys in the resulting
- /// `JSON.Dictionary` will be of type `String`.
- /// - returns: An instance of `JSON` where the enum case is `.Dictionary`.
- public func toJSON() -> JSON {
- var jsonDictionary = [String: JSON]()
-
- for (k, v) in self {
- let key = String(k)
- jsonDictionary[key] = v.toJSON()
- }
-
- return .Dictionary(jsonDictionary)
- }
-}
-
-extension Int: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Int`.
- public func toJSON() -> JSON {
- return .Int(self)
- }
-}
-
-extension Double: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Double`.
- public func toJSON() -> JSON {
- return .Double(self)
- }
-}
-
-extension String: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.String`.
- public func toJSON() -> JSON {
- return .String(self)
- }
-}
-
-extension Bool: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is `.Bool`.
- public func toJSON() -> JSON {
- return .Bool(self)
- }
-}
-
-extension RawRepresentable where RawValue: JSONEncodable {
- /// Converts an instance of a conforming type to `JSON`.
- /// - returns: An instance of `JSON` where the enum case is whatever the underlying `RawValue` converts to.
- public func toJSON() -> JSON {
- return rawValue.toJSON()
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodingDetector.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodingDetector.swift
deleted file mode 100755
index 933bc0c29..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONEncodingDetector.swift
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// JSONEncodingDetector.swift
-// Freddy
-//
-// Created by Robert Edwards on 1/27/16.
-// Copyright © 2016 Big Nerd Ranch. All rights reserved.
-//
-
-/// Struct for attempting to detect the Unicode encoding used with the data supplied to the JSONParser
-public struct JSONEncodingDetector {
-
- //// The Unicode encodings looked for during detection
- public enum Encoding {
- //// UTF-8
- case UTF8
- //// UTF-16 Little Endian
- case UTF16LE
- //// UTF-16 Big Endian
- case UTF16BE
- //// UTF-32 Little Endian
- case UTF32LE
- //// UTF-32 Big Endian
- case UTF32BE
- }
-
- //// The Unicode encodings supported by JSONParser.swift
- public static let supportedEncodings: [Encoding] = [.UTF8]
-
- typealias ByteStreamPrefixInformation = (encoding: Encoding, byteOrderMarkLength: Int)
-
- //// Attempts to detect the Unicode encoding used for a given set of data.
- ////
- //// This function initially looks for a Byte Order Mark in the following form:
- ////
- //// Bytes | Encoding Form
- //// --------------|----------------
- //// 00 00 FE FF | UTF-32, big-endian
- //// FF FE 00 00 | UTF-32, little-endian
- //// FE FF | UTF-16, big-endian
- //// FF FE | UTF-16, little-endian
- //// EF BB BF | UTF-8
- ////
- //// If a BOM is not found then we detect using the following approach described in
- //// the JSON RFC http://www.ietf.org/rfc/rfc4627.txt:
- ////
- //// Since the first two characters of a JSON text will always be ASCII
- //// characters [RFC0020], it is possible to determine whether an octet
- //// stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
- //// at the pattern of nulls in the first four octets.
- ////
- //// 00 00 00 xx UTF-32BE
- //// 00 xx 00 xx UTF-16BE
- //// xx 00 00 00 UTF-32LE
- //// xx 00 xx 00 UTF-16LE
- //// xx xx xx xx UTF-8
- ////
- //// - parameter header: The front Slice of data being read and evaluated.
- //// - returns: A tuple containing the detected Unicode encoding and the lenght of the byte order mark.
- static func detectEncoding(header: Slice>) -> ByteStreamPrefixInformation {
-
- guard let prefix = prefixFromHeader(header) else {
- return (.UTF8, 0)
- }
-
- if let prefixInfo = JSONEncodingDetector.encodingFromBOM(prefix) {
- return prefixInfo
- } else {
- switch prefix {
- case(0, 0, 0?, _):
- return (.UTF32BE, 0)
- case(_, 0, 0?, 0?):
- return (.UTF32LE, 0)
- case (0, _, 0?, _), (0, _, _, _):
- return (.UTF16BE, 0)
- case (_, 0, _, 0?), (_, 0, _, _):
- return (.UTF16LE, 0)
- default:
- return (.UTF8, 0)
- }
- }
- }
-
- private typealias EncodingBytePrefix = (UInt8, UInt8, UInt8?, UInt8?)
-
- private static func prefixFromHeader(header: Slice>) -> EncodingBytePrefix? {
- if header.count >= 4 {
- return(header[0], header[1], header[2], header[3])
- } else if header.count >= 2 {
- return (header[0], header[1], nil, nil)
- }
- return nil
- }
-
- private static func encodingFromBOM(prefix: EncodingBytePrefix) -> ByteStreamPrefixInformation? {
- switch prefix {
- case(0xFE, 0xFF, _, _):
- return (.UTF16BE, 2)
- case(0x00, 0x00, 0xFE?, 0xFF?):
- return (.UTF32BE, 4)
- case(0xEF, 0xBB, 0xBF?, _):
- return (.UTF8, 3)
- case(0xFF, 0xFE, 0?, 0?):
- return (.UTF32LE, 4)
- case(0xFF, 0xFE, _, _):
- return (.UTF16LE, 2)
- default:
- return nil
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONLiteralConvertible.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONLiteralConvertible.swift
deleted file mode 100755
index b90e05264..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONLiteralConvertible.swift
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// JSONLiteralConvertible.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 5/11/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-// MARK: - ArrayLiteralConvertible
-
-extension JSON: ArrayLiteralConvertible {
-
- /// Create an instance by copying each element of the `collection` into a
- /// new `Array`.
- public init(_ collection: Collection) {
- self = .Array(Swift.Array(collection))
- }
-
- /// Create an instance initialized with `elements`.
- public init(arrayLiteral elements: JSON...) {
- self.init(elements)
- }
-
-}
-
-// MARK: - DictionaryLiteralConvertible
-
-extension JSON: DictionaryLiteralConvertible {
-
- /// Create an instance by copying each key/value pair of the `pairs` into
- /// a new `Dictionary`.
- public init(_ pairs: Dictionary) {
- var dictionary = Swift.Dictionary(minimumCapacity: pairs.underestimateCount())
- for (key, value) in pairs {
- dictionary[key] = value
- }
- self = .Dictionary(dictionary)
- }
-
- /// Create an instance initialized with `pairs`.
- public init(dictionaryLiteral pairs: (Swift.String, JSON)...) {
- self.init(pairs)
- }
-
-}
-
-// MARK: - FloatLiteralConvertible
-
-extension JSON: FloatLiteralConvertible {
-
- /// Create an instance initialized to `Double` `value`.
- public init(_ value: Swift.Double) {
- self = .Double(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(floatLiteral value: Swift.Double) {
- self.init(value)
- }
-
-}
-
-// MARK: - IntegerLiteralConvertible
-
-extension JSON: IntegerLiteralConvertible {
-
- /// Create an instance initialized to `Int` by `value`.
- public init(_ value: Swift.Int) {
- self = .Int(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(integerLiteral value: Swift.Int) {
- self.init(value)
- }
-
-}
-
-// MARK: - StringLiteralConvertible
-
-extension JSON: StringLiteralConvertible {
-
- /// Create an instance initialized to `String` by `text`.
- public init(_ text: Swift.String) {
- self = .String(text)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(stringLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(extendedGraphemeClusterLiteral value: StringLiteralType) {
- self.init(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(unicodeScalarLiteral value: StringLiteralType) {
- self.init(value)
- }
-
-}
-
-// MARK: - BooleanLiteralConvertible
-
-extension JSON: BooleanLiteralConvertible {
-
- /// Create an instance initialized to `Bool` by `value`.
- public init(_ value: Swift.Bool) {
- self = .Bool(value)
- }
-
- /// Create a literal instance initialized to `value`.
- public init(booleanLiteral value: Swift.Bool) {
- self.init(value)
- }
-
-}
-
-// MARK: - NilLiteralConvertible
-
-extension JSON: NilLiteralConvertible {
-
- /// Create an instance initialized with `nil`.
- public init(nilLiteral: ()) {
- self = .Null
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParser.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParser.swift
deleted file mode 100755
index 00dc9af1f..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParser.swift
+++ /dev/null
@@ -1,903 +0,0 @@
-//
-// JSONParser.swift
-// Freddy
-//
-// Created by John Gallagher on 4/18/15.
-// Copyright © 2015 Big Nerd Ranch. Licensed under MIT.
-//
-
-import Foundation
-
-private struct Literal {
- static let BACKSLASH = UInt8(ascii: "\\")
- static let BACKSPACE = UInt8(ascii: "\u{0008}")
- static let COLON = UInt8(ascii: ":")
- static let COMMA = UInt8(ascii: ",")
- static let DOUBLE_QUOTE = UInt8(ascii: "\"")
- static let FORMFEED = UInt8(ascii: "\u{000c}")
- static let LEFT_BRACE = UInt8(ascii: "{")
- static let LEFT_BRACKET = UInt8(ascii: "[")
- static let MINUS = UInt8(ascii: "-")
- static let NEWLINE = UInt8(ascii: "\n")
- static let PERIOD = UInt8(ascii: ".")
- static let PLUS = UInt8(ascii: "+")
- static let RETURN = UInt8(ascii: "\r")
- static let RIGHT_BRACE = UInt8(ascii: "}")
- static let RIGHT_BRACKET = UInt8(ascii: "]")
- static let SLASH = UInt8(ascii: "/")
- static let SPACE = UInt8(ascii: " ")
- static let TAB = UInt8(ascii: "\t")
-
- static let a = UInt8(ascii: "a")
- static let b = UInt8(ascii: "b")
- static let c = UInt8(ascii: "c")
- static let d = UInt8(ascii: "d")
- static let e = UInt8(ascii: "e")
- static let f = UInt8(ascii: "f")
- static let l = UInt8(ascii: "l")
- static let n = UInt8(ascii: "n")
- static let r = UInt8(ascii: "r")
- static let s = UInt8(ascii: "s")
- static let t = UInt8(ascii: "t")
- static let u = UInt8(ascii: "u")
-
- static let A = UInt8(ascii: "A")
- static let B = UInt8(ascii: "B")
- static let C = UInt8(ascii: "C")
- static let D = UInt8(ascii: "D")
- static let E = UInt8(ascii: "E")
- static let F = UInt8(ascii: "F")
-
- static let zero = UInt8(ascii: "0")
- static let one = UInt8(ascii: "1")
- static let two = UInt8(ascii: "2")
- static let three = UInt8(ascii: "3")
- static let four = UInt8(ascii: "4")
- static let five = UInt8(ascii: "5")
- static let six = UInt8(ascii: "6")
- static let seven = UInt8(ascii: "7")
- static let eight = UInt8(ascii: "8")
- static let nine = UInt8(ascii: "9")
-}
-
-private let ParserMaximumDepth = 512
-
-
-/// A pure Swift JSON parser. This parser is much faster than the
-/// `NSJSONSerialization`-based parser (due to the overhead of having to
-/// dynamically cast the Objective-C objects to determine their type); however,
-/// it is much newer and has restrictions that the `NSJSONSerialization` parser
-/// does not. Two restrictions in particular are that it requires UTF-8 data as
-/// input and it does not allow trailing commas in arrays or dictionaries.
-public struct JSONParser {
-
- private enum Sign: Int {
- case Positive = 1
- case Negative = -1
- }
-
- private let input: UnsafeBufferPointer
- private let owner: Any?
- private var loc = 0
- private var depth = 0
-
- private init(buffer: UnsafeBufferPointer, owner: T) {
- self.input = buffer
- self.owner = owner
- }
-
- /// Decode the root element of the `JSON` stream. This may be any fragment
- /// or a structural element, per RFC 7159.
- ///
- /// The beginning bytes are used to determine the stream's encoding.
- /// `JSONParser` currently only supports UTF-8 encoding, with or without
- /// a byte-order mark.
- ///
- /// - throws: `JSONParser.Error` for any decoding failures, including a
- /// source location if needed.
- public mutating func parse() throws -> JSON {
- try guardAgainstUnsupportedEncodings()
- let value = try parseValue()
- skipWhitespace()
- guard loc == input.count else {
- throw Error.EndOfStreamGarbage(offset: loc)
- }
- return value
- }
-
- private mutating func parseValue() throws -> JSON {
- guard depth <= ParserMaximumDepth else {
- throw Error.ExceededNestingLimit(offset: loc)
- }
-
- guard input.count > 0 else {
- throw Error.EndOfStreamUnexpected
- }
-
- advancing: while loc < input.count {
- do {
- switch input[loc] {
- case Literal.LEFT_BRACKET:
- depth += 1
- defer { depth -= 1 }
- return try decodeArray()
-
- case Literal.LEFT_BRACE:
- depth += 1
- defer { depth -= 1 }
- return try decodeObject()
-
- case Literal.DOUBLE_QUOTE:
- return try decodeString()
-
- case Literal.f:
- return try decodeFalse()
-
- case Literal.n:
- return try decodeNull()
-
- case Literal.t:
- return try decodeTrue()
-
- case Literal.MINUS:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingMinus))
-
- case Literal.zero:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingZero))
-
- case Literal.one...Literal.nine:
- return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .PreDecimalDigits))
-
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = loc.successor()
-
- default:
- break advancing
- }
- } catch let InternalError.NumberOverflow(offset: start) {
- return try decodeNumberAsString(start)
- }
- }
-
- throw Error.ValueInvalid(offset: loc, character: UnicodeScalar(input[loc]))
- }
-
- private mutating func skipWhitespace() {
- while loc < input.count {
- switch input[loc] {
- case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE:
- loc = loc.successor()
-
- default:
- return
- }
- }
- }
-
- private mutating func guardAgainstUnsupportedEncodings() throws {
- let header = input.prefix(4)
- let encodingPrefixInformation = JSONEncodingDetector.detectEncoding(header)
- guard JSONEncodingDetector.supportedEncodings.contains(encodingPrefixInformation.encoding) else {
- throw Error.InvalidUnicodeStreamEncoding(detectedEncoding: encodingPrefixInformation.encoding)
- }
- loc = loc.advancedBy(encodingPrefixInformation.byteOrderMarkLength)
- }
-
- private mutating func decodeNull() throws -> JSON {
- guard loc.advancedBy(3, limit: input.count) != input.count else {
- throw Error.LiteralNilMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.u
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.l {
- throw Error.LiteralNilMisspelled(offset: loc)
- }
-
- loc += 4
- return .Null
- }
-
- private mutating func decodeTrue() throws -> JSON {
- guard loc.advancedBy(3, limit: input.count) != input.count else {
- throw Error.LiteralTrueMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.r
- || input[loc+2] != Literal.u
- || input[loc+3] != Literal.e {
- throw Error.LiteralTrueMisspelled(offset: loc)
- }
-
- loc += 4
- return .Bool(true)
- }
-
- private mutating func decodeFalse() throws -> JSON {
- guard loc.advancedBy(4, limit: input.count) != input.count else {
- throw Error.LiteralFalseMisspelled(offset: loc)
- }
-
- if input[loc+1] != Literal.a
- || input[loc+2] != Literal.l
- || input[loc+3] != Literal.s
- || input[loc+4] != Literal.e {
- throw Error.LiteralFalseMisspelled(offset: loc)
- }
-
- loc += 5
- return .Bool(false)
- }
-
- private var stringDecodingBuffer = [UInt8]()
- private mutating func decodeString() throws -> JSON {
- let start = loc
- loc = loc.successor()
- stringDecodingBuffer.removeAll(keepCapacity: true)
- while loc < input.count {
- switch input[loc] {
- case Literal.BACKSLASH:
- loc = loc.successor()
- switch input[loc] {
- case Literal.DOUBLE_QUOTE: stringDecodingBuffer.append(Literal.DOUBLE_QUOTE)
- case Literal.BACKSLASH: stringDecodingBuffer.append(Literal.BACKSLASH)
- case Literal.SLASH: stringDecodingBuffer.append(Literal.SLASH)
- case Literal.b: stringDecodingBuffer.append(Literal.BACKSPACE)
- case Literal.f: stringDecodingBuffer.append(Literal.FORMFEED)
- case Literal.r: stringDecodingBuffer.append(Literal.RETURN)
- case Literal.t: stringDecodingBuffer.append(Literal.TAB)
- case Literal.n: stringDecodingBuffer.append(Literal.NEWLINE)
- case Literal.u:
- loc = loc.successor()
- try readUnicodeEscape(start: loc - 2)
-
- // readUnicodeEscape() advances loc on its own, so we'll `continue` now
- // to skip the typical "advance past this character" for all the other escapes
- continue
-
- default:
- throw Error.ControlCharacterUnrecognized(offset: loc)
- }
- loc = loc.successor()
-
- case Literal.DOUBLE_QUOTE:
- loc = loc.successor()
- stringDecodingBuffer.append(0)
-
- guard let string = (stringDecodingBuffer.withUnsafeBufferPointer {
- String.fromCString(UnsafePointer($0.baseAddress))
- }) else {
- throw Error.UnicodeEscapeInvalid(offset: start)
- }
-
- return .String(string)
-
- case let other:
- stringDecodingBuffer.append(other)
- loc = loc.successor()
- }
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- private mutating func readCodeUnit() -> UInt16? {
- guard loc + 4 <= input.count else {
- return nil
- }
- var codeUnit: UInt16 = 0
- for c in input[loc.. JSON {
- let start = loc
- loc = loc.successor()
- var items = [JSON]()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACKET {
- loc = loc.successor()
- return .Array(items)
- }
-
- if !items.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
- }
-
- items.append(try parseValue())
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- // Decoding objects can be recursive, so we have to keep more than one
- // buffer around for building up key/value pairs (to reduce allocations
- // when parsing large JSON documents).
- //
- // Rough estimate of the difference between this and using a fresh
- // [(String,JSON)] for the `pairs` variable in decodeObject() below is
- // about 12% on an iPhone 5.
- private struct DecodeObjectBuffers {
- var buffers = [[(String,JSON)]]()
-
- mutating func getBuffer() -> [(String,JSON)] {
- if !buffers.isEmpty {
- var buffer = buffers.removeLast()
- buffer.removeAll(keepCapacity: true)
- return buffer
- }
- return [(String,JSON)]()
- }
-
- mutating func putBuffer(buffer: [(String,JSON)]) {
- buffers.append(buffer)
- }
- }
-
- private var decodeObjectBuffers = DecodeObjectBuffers()
-
- private mutating func decodeObject() throws -> JSON {
- let start = loc
- loc = loc.successor()
- var pairs = decodeObjectBuffers.getBuffer()
-
- while loc < input.count {
- skipWhitespace()
-
- if loc < input.count && input[loc] == Literal.RIGHT_BRACE {
- loc = loc.successor()
- var obj = [String:JSON](minimumCapacity: pairs.count)
- for (k, v) in pairs {
- obj[k] = v
- }
- decodeObjectBuffers.putBuffer(pairs)
- return .Dictionary(obj)
- }
-
- if !pairs.isEmpty {
- guard loc < input.count && input[loc] == Literal.COMMA else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
-
- skipWhitespace()
- }
-
- guard loc < input.count && input[loc] == Literal.DOUBLE_QUOTE else {
- throw Error.DictionaryMissingKey(offset: start)
- }
-
- let key = try decodeString().string()
- skipWhitespace()
-
- guard loc < input.count && input[loc] == Literal.COLON else {
- throw Error.CollectionMissingSeparator(offset: start)
- }
- loc = loc.successor()
-
- pairs.append((key, try parseValue()))
- }
-
- throw Error.EndOfStreamUnexpected
- }
-
- private mutating func decodeIntegralValue(parser: NumberParser) throws -> JSON {
- var sign = Sign.Positive
- var parser = parser
- var value = 0
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .Done {
- switch parser.state {
- case .LeadingMinus:
- sign = .Negative
- try parser.parseNegative()
-
- case .LeadingZero:
- parser.parseLeadingZero()
-
- case .PreDecimalDigits:
- try parser.parsePreDecimalDigits { c in
- guard case let (exponent, false) = Int.multiplyWithOverflow(10, value) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- guard case let (newValue, false) = Int.addWithOverflow(exponent, Int(c - Literal.zero)) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- value = newValue
- }
-
- case .Decimal, .Exponent:
- return try detectingFloatingPointErrors(parser.start) {
- try decodeFloatingPointValue(parser, sign: sign, value: Double(value))
- }
-
- case .PostDecimalDigits, .ExponentSign, .ExponentDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .Done:
- fatalError("impossible condition")
- }
- }
-
- guard case let (signedValue, false) = Int.multiplyWithOverflow(sign.rawValue, value) else {
- throw InternalError.NumberOverflow(offset: parser.start)
- }
-
- loc = parser.loc
- return .Int(signedValue)
- }
-
- private mutating func decodeFloatingPointValue(parser: NumberParser, sign: Sign, value: Double) throws -> JSON {
- var parser = parser
- var value = value
- var exponentSign = Sign.Positive
- var exponent = Double(0)
- var position = 0.1
-
- // This would be more natural as `while true { ... }` with a meaningful .Done case,
- // but that causes compile time explosion in Swift 2.2. :-|
- while parser.state != .Done {
- switch parser.state {
- case .LeadingMinus, .LeadingZero, .PreDecimalDigits:
- assertionFailure("Invalid internal state while parsing number")
-
- case .Decimal:
- try parser.parseDecimal()
-
- case .PostDecimalDigits:
- parser.parsePostDecimalDigits { c in
- value += position * Double(c - Literal.zero)
- position /= 10
- }
-
- case .Exponent:
- exponentSign = try parser.parseExponent()
-
- case .ExponentSign:
- try parser.parseExponentSign()
-
- case .ExponentDigits:
- parser.parseExponentDigits { c in
- exponent = exponent * 10 + Double(c - Literal.zero)
- }
-
- case .Done:
- fatalError("impossible condition")
- }
- }
-
- loc = parser.loc
- return .Double(Double(sign.rawValue) * value * pow(10, Double(exponentSign.rawValue) * exponent))
- }
-
- private mutating func decodeNumberAsString(start: Int) throws -> JSON {
- var parser: NumberParser = {
- let state: NumberParser.State
- switch input[start] {
- case Literal.MINUS: state = .LeadingMinus
- case Literal.zero: state = .LeadingZero
- case Literal.one...Literal.nine: state = .PreDecimalDigits
- default:
- fatalError("Internal error: decodeNumber called on not-a-number")
- }
- return NumberParser(loc: start, input: input, state: state)
- }()
-
- stringDecodingBuffer.removeAll(keepCapacity: true)
-
- while true {
- switch parser.state {
- case .LeadingMinus:
- try parser.parseNegative()
- stringDecodingBuffer.append(Literal.MINUS)
-
- case .LeadingZero:
- parser.parseLeadingZero()
- stringDecodingBuffer.append(Literal.zero)
-
- case .PreDecimalDigits:
- parser.parsePreDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .Decimal:
- try parser.parseDecimal()
- stringDecodingBuffer.append(Literal.PERIOD)
-
- case .PostDecimalDigits:
- parser.parsePostDecimalDigits { stringDecodingBuffer.append($0) }
-
- case .Exponent:
- stringDecodingBuffer.append(input[parser.loc])
- _ = try parser.parseExponent()
-
- case .ExponentSign:
- stringDecodingBuffer.append(input[parser.loc])
- try parser.parseExponentSign()
-
- case .ExponentDigits:
- parser.parseExponentDigits { stringDecodingBuffer.append($0) }
-
- case .Done:
- stringDecodingBuffer.append(0)
- guard let string = (stringDecodingBuffer.withUnsafeBufferPointer {
- String.fromCString(UnsafePointer($0.baseAddress))
- }) else {
- // Should never fail - any problems with the number string should
- // result in thrown errors above
- fatalError("Internal error: Invalid numeric string")
- }
-
- loc = parser.loc
- return .String(string)
- }
- }
- }
-
- private func detectingFloatingPointErrors(loc: Int, @noescape _ f: () throws -> T) throws -> T {
- let flags = FE_UNDERFLOW | FE_OVERFLOW
- feclearexcept(flags)
- let value = try f()
- guard fetestexcept(flags) == 0 else {
- throw InternalError.NumberOverflow(offset: loc)
- }
- return value
- }
-}
-
-private struct NumberParser {
- enum State {
- case LeadingMinus
- case LeadingZero
- case PreDecimalDigits
- case Decimal
- case PostDecimalDigits
- case Exponent
- case ExponentSign
- case ExponentDigits
- case Done
- }
-
- let start: Int
- var loc = 0
- var state: State
- let input: UnsafeBufferPointer
-
- init(loc: Int, input: UnsafeBufferPointer, state: State) {
- assert(loc < input.count, "Invalid input to NumberParser")
- self.start = loc
- self.loc = loc
- self.input = input
- self.state = state
- }
-
- mutating func parseNegative() throws {
- assert(state == .LeadingMinus, "Unexpected state entering parseNegative")
-
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero:
- state = .LeadingZero
-
- case Literal.one...Literal.nine:
- state = .PreDecimalDigits
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseLeadingZero() {
- assert(state == .LeadingZero, "Unexpected state entering parseLeadingZero")
-
- loc = loc.successor()
- guard loc < input.count else {
- state = .Done
- return
- }
-
- guard input[loc] == Literal.PERIOD else {
- state = .Done
- return
- }
-
- state = .Decimal
- }
-
- mutating func parsePreDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .PreDecimalDigits, "Unexpected state entering parsePreDecimalDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- case Literal.PERIOD:
- state = .Decimal
- return
-
- case Literal.e, Literal.E:
- state = .Exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-
- mutating func parseDecimal() throws {
- assert(state == .Decimal, "Unexpected state entering parseDecimal")
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .PostDecimalDigits
-
- default:
- throw JSONParser.Error.NumberMissingFractionalDigits(offset: start)
- }
- }
-
- mutating func parsePostDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .PostDecimalDigits, "Unexpected state entering parsePostDecimalDigits")
-
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- case Literal.e, Literal.E:
- state = .Exponent
- return
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-
- mutating func parseExponent() throws -> JSONParser.Sign {
- assert(state == .Exponent, "Unexpected state entering parseExponent")
-
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .ExponentDigits
-
- case Literal.PLUS:
- state = .ExponentSign
-
- case Literal.MINUS:
- state = .ExponentSign
- return .Negative
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
-
- return .Positive
- }
-
- mutating func parseExponentSign() throws {
- assert(state == .ExponentSign, "Unexpected state entering parseExponentSign")
- loc = loc.successor()
- guard loc < input.count else {
- throw JSONParser.Error.EndOfStreamUnexpected
- }
-
- switch input[loc] {
- case Literal.zero...Literal.nine:
- state = .ExponentDigits
-
- default:
- throw JSONParser.Error.NumberSymbolMissingDigits(offset: start)
- }
- }
-
- mutating func parseExponentDigits(@noescape f: (UInt8) throws -> Void) rethrows {
- assert(state == .ExponentDigits, "Unexpected state entering parseExponentDigits")
- advancing: while loc < input.count {
- let c = input[loc]
- switch c {
- case Literal.zero...Literal.nine:
- try f(c)
- loc = loc.successor()
-
- default:
- break advancing
- }
- }
-
- state = .Done
- }
-}
-
-public extension JSONParser {
-
- /// Creates a `JSONParser` ready to parse UTF-8 encoded `NSData`.
- ///
- /// If the data is mutable, it is copied before parsing. The data's lifetime
- /// is extended for the duration of parsing.
- init(utf8Data inData: NSData) {
- let data = inData.copy() as! NSData
- let buffer = UnsafeBufferPointer(start: UnsafePointer(data.bytes), count: data.length)
- self.init(buffer: buffer, owner: data)
- }
-
- /// Creates a `JSONParser` from the code units represented by the `string`.
- ///
- /// The synthesized string is lifetime-extended for the duration of parsing.
- init(string: String) {
- let codePoints = string.nulTerminatedUTF8
- let buffer = codePoints.withUnsafeBufferPointer { nulTerminatedBuffer in
- // don't want to include the nul termination in the buffer - trim it off
- UnsafeBufferPointer(start: nulTerminatedBuffer.baseAddress, count: nulTerminatedBuffer.count - 1)
- }
- self.init(buffer: buffer, owner: codePoints)
- }
-
-}
-
-extension JSONParser: JSONParserType {
-
- /// Creates an instance of `JSON` from UTF-8 encoded `NSData`.
- /// - parameter data: An instance of `NSData` to parse `JSON` from.
- /// - throws: Any `JSONParser.Error` that arises during decoding.
- /// - seealso: JSONParser.parse()
- public static func createJSONFromData(data: NSData) throws -> JSON {
- var parser = JSONParser(utf8Data: data)
- return try parser.parse()
- }
-
-}
-
-// MARK: - Errors
-
-extension JSONParser {
-
- /// Enumeration describing possible errors that occur while parsing a JSON
- /// document. Most errors include an associated `offset`, representing the
- /// offset into the UTF-8 characters making up the document where the error
- /// occurred.
- public enum Error: ErrorType {
- /// The parser ran out of data prematurely. This usually means a value
- /// was not escaped, such as a string literal not ending with a double
- /// quote.
- case EndOfStreamUnexpected
-
- /// Unexpected non-whitespace data was left around `offset` after
- /// parsing all valid JSON.
- case EndOfStreamGarbage(offset: Int)
-
- /// Too many nested objects or arrays occured at the literal started
- /// around `offset`.
- case ExceededNestingLimit(offset: Int)
-
- /// A `character` was not a valid start of a value around `offset`.
- case ValueInvalid(offset: Int, character: UnicodeScalar)
-
- /// Badly-formed Unicode escape sequence at `offset`. A Unicode escape
- /// uses the text "\u" followed by 4 hex digits, such as "\uF09F\uA684"
- /// to represent U+1F984, "UNICORN FACE".
- case UnicodeEscapeInvalid(offset: Int)
-
- /// Badly-formed control character around `offset`. JSON supports
- /// backslash-escaped double quotes, slashes, whitespace control codes,
- /// and Unicode escape sequences.
- case ControlCharacterUnrecognized(offset: Int)
-
- /// Invalid token, expected `null` around `offset`
- case LiteralNilMisspelled(offset: Int)
-
- /// Invalid token, expected `true` around `offset`
- case LiteralTrueMisspelled(offset: Int)
-
- /// Invalid token, expected `false` around `offset`
- case LiteralFalseMisspelled(offset: Int)
-
- /// Badly-formed collection at given `offset`, expected `,` or `:`
- case CollectionMissingSeparator(offset: Int)
-
- /// While parsing an object literal, a value was found without a key
- /// around `offset`. The start of a string literal was expected.
- case DictionaryMissingKey(offset: Int)
-
- /// Badly-formed number with no digits around `offset`. After a decimal
- /// point, a number must include some number of digits.
- case NumberMissingFractionalDigits(offset: Int)
-
- /// Badly-formed number with symbols ("-" or "e") but no following
- /// digits around `offset`.
- case NumberSymbolMissingDigits(offset: Int)
-
- /// Supplied data is encoded in an unsupported format.
- case InvalidUnicodeStreamEncoding(detectedEncoding: JSONEncodingDetector.Encoding)
- }
-
- private enum InternalError: ErrorType {
- /// Attempted to parse an integer outside the range of [Int.min, Int.max]
- /// or a double outside the range of representable doubles. Note that
- /// for doubles, this could be an overflow or an underflow - we don't
- /// get enough information from Swift here to know which it is. The number
- /// causing the overflow/underflow began at `offset`.
- case NumberOverflow(offset: Int)
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParsing.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParsing.swift
deleted file mode 100755
index 90cb6be23..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONParsing.swift
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// JSONParsing.swift
-// Freddy
-//
-// Created by Matthew D. Mathias on 3/17/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-import Foundation
-
-// MARK: - Deserialize JSON
-
-/// Protocol describing a backend parser that can produce `JSON` from `NSData`.
-public protocol JSONParserType {
-
- /// Creates an instance of `JSON` from `NSData`.
- /// - parameter data: An instance of `NSData` to use to create `JSON`.
- /// - throws: An error that may arise from calling `JSONObjectWithData(_:options:)` on `NSJSONSerialization` with the given data.
- /// - returns: An instance of `JSON`.
- static func createJSONFromData(data: NSData) throws -> JSON
-
-}
-
-extension JSON {
-
- /// Create `JSON` from UTF-8 `data`. By default, parses using the
- /// Swift-native `JSONParser` backend.
- public init(data: NSData, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSONFromData(data)
- }
-
- /// Create `JSON` from UTF-8 `string`.
- public init(jsonString: Swift.String, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
- self = try parser.createJSONFromData((jsonString as NSString).dataUsingEncoding(NSUTF8StringEncoding) ?? NSData())
- }
-}
-
-// MARK: - NSJSONSerialization
-
-extension NSJSONSerialization: JSONParserType {
-
- // MARK: Decode NSData
-
- /// Use the built-in, Objective-C based JSON parser to create `JSON`.
- /// - parameter data: An instance of `NSData`.
- /// - returns: An instance of `JSON`.
- /// - throws: An error that may arise if the `NSData` cannot be parsed into an object.
- public static func createJSONFromData(data: NSData) throws -> JSON {
- return makeJSON(try NSJSONSerialization.JSONObjectWithData(data, options: []))
- }
-
- // MARK: Make JSON
-
- /// Makes a `JSON` object by matching its argument to a case in the `JSON` enum.
- /// - parameter object: The instance of `AnyObject` returned from serializing the JSON.
- /// - returns: An instance of `JSON` matching the JSON given to the function.
- private static func makeJSON(object: AnyObject) -> JSON {
- switch object {
- case let n as NSNumber:
- let numberType = CFNumberGetType(n)
- switch numberType {
- case .CharType:
- return .Bool(n.boolValue)
-
- case .ShortType, .IntType, .LongType, .CFIndexType, .NSIntegerType, .SInt8Type, .SInt16Type, .SInt32Type:
- return .Int(n.integerValue)
-
- case .SInt64Type, .LongLongType /* overflows 32-bit Int */:
- #if /* 32-bit arch */ arch(arm) || arch(i386)
- // Why double, when the Freddy parser would bump to String?
- //
- // Returning Double avoids making the type depend on whether you're running
- // 32-bit or 64-bit code when using the NSJSONSerialization parser.
- // NSJSONSerialization appears to bump numbers larger than Int.max to Double on
- // 64-bit platforms but use .SInt64Type on 32-bit platforms.
- // If we returned a String here, you'd get a String value on 32-bit,
- // but a Double value on 64-bit. Instead, we return Double.
- //
- // This means that, if you switch parsers,
- // you'll have to switch from .double to .string for pulling out
- // overflowing values, but if you stick with a single parser,
- // you at least won't have architecture-dependent lookups!
- return .Double(n.doubleValue)
- #else
- return .Int(n.integerValue)
- #endif
-
- case .Float32Type, .Float64Type, .FloatType, .DoubleType, .CGFloatType:
- return .Double(n.doubleValue)
- }
-
- case let arr as [AnyObject]:
- return makeJSONArray(arr)
-
- case let dict as [Swift.String: AnyObject]:
- return makeJSONDictionary(dict)
-
- case let s as Swift.String:
- return .String(s)
-
- default:
- return .Null
- }
- }
-
- // MARK: Make a JSON Array
-
- /// Makes a `JSON` array from the object passed in.
- /// - parameter jsonArray: The array to transform into a `JSON`.
- /// - returns: An instance of `JSON` matching the array.
- private static func makeJSONArray(jsonArray: [AnyObject]) -> JSON {
- return .Array(jsonArray.map(makeJSON))
- }
-
- // MARK: Make a JSON Dictionary
-
- /// Makes a `JSON` dictionary from the Cocoa dictionary passed in.
- /// - parameter jsonDict: The dictionary to transform into `JSON`.
- /// - returns: An instance of `JSON` matching the dictionary.
- private static func makeJSONDictionary(jsonDict: [Swift.String: AnyObject]) -> JSON {
- return JSON(jsonDict.lazy.map { (key, value) in
- (key, makeJSON(value))
- })
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSerializing.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSerializing.swift
deleted file mode 100755
index 343a5a30d..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSerializing.swift
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2016 Big Nerd Ranch, Inc. Licensed under the MIT license WITHOUT ANY WARRANTY.
-
-import Foundation
-
-// MARK: - Serialize JSON
-
-extension JSON {
-
- /// Attempt to serialize `JSON` into an `NSData`.
- /// - returns: A byte-stream containing the `JSON` ready for wire transfer.
- /// - throws: Errors that arise from `NSJSONSerialization`.
- /// - see: Foundation.NSJSONSerialization
- public func serialize() throws -> NSData {
- let obj: AnyObject = toNSJSONSerializationObject()
- return try NSJSONSerialization.dataWithJSONObject(obj, options: [])
- }
-
- /// A function to help with the serialization of `JSON`.
- /// - returns: An `AnyObject` suitable for `NSJSONSerialization`'s use.
- private func toNSJSONSerializationObject() -> AnyObject {
- switch self {
- case .Array(let jsonArray):
- return jsonArray.map { $0.toNSJSONSerializationObject() }
- case .Dictionary(let jsonDictionary):
- var cocoaDictionary = Swift.Dictionary(minimumCapacity: jsonDictionary.count)
- for (key, json) in jsonDictionary {
- cocoaDictionary[key] = json.toNSJSONSerializationObject()
- }
- return cocoaDictionary
- case .String(let str):
- return str
- case .Double(let num):
- return num
- case .Int(let int):
- return int
- case .Bool(let b):
- return b
- case .Null:
- return NSNull()
- }
-
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSubscripting.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSubscripting.swift
deleted file mode 100755
index 785f8ce9b..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/JSONSubscripting.swift
+++ /dev/null
@@ -1,643 +0,0 @@
-//
-// JSONSubscripting.swift
-// Freddy
-//
-// Created by Zachary Waldowski on 8/15/15.
-// Copyright © 2015 Big Nerd Ranch. All rights reserved.
-//
-
-// MARK: JSONPathType
-
-/// A protocol used to define a path within an instance of `JSON` that leads to some desired value.
-///
-/// A custom type, such as a `RawRepresentable` enum, may be made to conform to `JSONPathType`
-/// and used with the subscript APIs.
-public protocol JSONPathType {
- /// Use `self` to key into a `dictionary`.
- ///
- /// Unlike Swift dictionaries, failing to find a value for a key should throw
- /// an error rather than convert to `nil`.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON
-
- /// Use `self` to index into an `array`.
- ///
- /// Unlike Swift array, attempting to index outside the collection's bounds
- /// should throw an error rather than crash.
- ///
- /// Upon failure, implementers should throw an error from `JSON.Error`.
- func valueInArray(array: [JSON]) throws -> JSON
-}
-
-extension JSONPathType {
-
- /// The default behavior for keying into a dictionary is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON {
- throw JSON.Error.UnexpectedSubscript(type: Self.self)
- }
-
- /// The default behavior for indexing into an array is to throw
- /// `JSON.Error.UnexpectedSubscript`.
- public func valueInArray(array: [JSON]) throws -> JSON {
- throw JSON.Error.UnexpectedSubscript(type: Self.self)
- }
-
-}
-
-extension String: JSONPathType {
-
- /// A method used to retrieve a value from a given dictionary for a specific key.
- /// - throws: `.KeyNotFound` with an associated value of `self`, where `self` is a `String`,
- /// should the key not be present within the `JSON`.
- /// - returns: The `JSON` value associated with the given key.
- public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON {
- guard let next = dictionary[self] else {
- throw JSON.Error.KeyNotFound(key: self)
- }
- return next
- }
-
-}
-
-extension Int: JSONPathType {
-
- /// A method used to retrieve a value from a given array for a specific index.
- /// - throws: `.IndexOutOfBounds` with an associated value of `self`, where `self` is an `Int`,
- /// should the index not be within the valid range for the array of `JSON`.
- /// - returns: The `JSON` value found at the given index.
- public func valueInArray(array: [JSON]) throws -> JSON {
- guard case array.indices = self else {
- throw JSON.Error.IndexOutOfBounds(index: self)
- }
- return array[self]
- }
-
-}
-
-// MARK: - Subscripting core
-
-private extension JSON {
-
- enum SubscriptError: ErrorType {
- case SubscriptIntoNull(JSONPathType)
- }
-
- func valueForPathFragment(fragment: JSONPathType, detectNull: Swift.Bool) throws -> JSON {
- switch self {
- case .Null where detectNull:
- throw SubscriptError.SubscriptIntoNull(fragment)
- case let .Dictionary(dict):
- return try fragment.valueInDictionary(dict)
- case let .Array(array):
- return try fragment.valueInArray(array)
- default:
- throw Error.UnexpectedSubscript(type: fragment.dynamicType)
- }
- }
-
- func valueAtPath(path: [JSONPathType], detectNull: Swift.Bool = false) throws -> JSON {
- var result = self
- for fragment in path {
- result = try result.valueForPathFragment(fragment, detectNull: detectNull)
- }
- return result
- }
-
-}
-
-// MARK: - Subscripting operator
-
-extension JSON {
-
- public subscript(key: Swift.String) -> JSON? {
- return try? valueForPathFragment(key, detectNull: false)
- }
-
- public subscript(index: Swift.Int) -> JSON? {
- return try? valueForPathFragment(index, detectNull: false)
- }
-
-}
-
-// MARK: - Simple member unpacking
-
-extension JSON {
-
- /// Attempts to decode into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A given `String` key does not exist inside a
- /// descendant `JSON` dictionary.
- /// * `IndexOutOfBounds`: A given `Int` index is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> Decoded {
- return try Decoded(json: valueAtPath(path))
- }
-
- /// Retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func double(path: JSONPathType...) throws -> Swift.Double {
- return try Swift.Double(json: valueAtPath(path))
- }
-
- /// Retrieves an `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A numeric `Int`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func int(path: JSONPathType...) throws -> Swift.Int {
- return try Swift.Int(json: valueAtPath(path))
- }
-
- /// Retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A textual `String`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func string(path: JSONPathType...) throws -> Swift.String {
- return try Swift.String(json: valueAtPath(path))
- }
-
- /// Retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: A truthy `Bool`
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func bool(path: JSONPathType...) throws -> Swift.Bool {
- return try Swift.Bool(json: valueAtPath(path))
- }
-
- /// Retrieves a `[JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func array(path: JSONPathType...) throws -> [JSON] {
- return try JSON.getArray(valueAtPath(path))
- }
-
- /// Attempts to decodes many values from a desendant JSON array at a path
- /// into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`, or
- /// any error that arises from decoding the contained values.
- /// - seealso: `JSON.decode(_:type:)`
- public func arrayOf(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Decoded] {
- return try JSON.getArrayOf(valueAtPath(path))
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`.
- /// - seealso: `JSON.decode(_:type:)`
- public func dictionary(path: JSONPathType...) throws -> [Swift.String: JSON] {
- return try JSON.getDictionary(valueAtPath(path))
- }
-
-}
-
-// MARK: - NotFound-Or-Null-to-Optional unpacking
-
-extension JSON {
-
- /// An `OptionSetType` used to represent the different options available for subscripting `JSON` with `null` values or missing keys.
- /// * `.NullBecomesNil` - Treat `null` values as `nil`.
- /// * `.MissingKeyBecomesNil` - Treat missing keys as `nil`.
- public struct SubscriptingOptions: OptionSetType {
- public let rawValue: Swift.Int
- public init(rawValue: Swift.Int) {
- self.rawValue = rawValue
- }
-
- /// Treat `null` values as `nil`.
- public static let NullBecomesNil = SubscriptingOptions(rawValue: 1 << 0)
- /// Treat missing keys as `nil`.
- public static let MissingKeyBecomesNil = SubscriptingOptions(rawValue: 1 << 1)
- }
-
- private func mapOptionalAtPath(path: [JSONPathType], alongPath: SubscriptingOptions, @noescape transform: JSON throws -> Value) throws -> Value? {
- let detectNull = alongPath.contains(.NullBecomesNil)
- let detectNotFound = alongPath.contains(.MissingKeyBecomesNil)
- var json: JSON?
- do {
- json = try valueAtPath(path, detectNull: detectNull)
- return try json.map(transform)
- } catch Error.IndexOutOfBounds where detectNotFound {
- return nil
- } catch Error.KeyNotFound where detectNotFound {
- return nil
- } catch Error.ValueNotConvertible where detectNull && json == .Null {
- return nil
- } catch SubscriptError.SubscriptIntoNull where detectNull {
- return nil
- }
- }
-}
-
-extension JSON {
-
- /// Optionally decodes into the returning type from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - parameter type: If the context this method is called from does not
- /// make the return type clear, pass a type implementing `JSONDecodable`
- /// to disambiguate the type to decode with.
- /// - returns: A decoded value from the inner JSON if found, or `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func decode(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- /// Optionally retrieves a `Double` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`.
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Double` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func double(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Double? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- /// Optionally retrieves a `Int` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A numeric `Int` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func int(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Int? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- /// Optionally retrieves a `String` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A text `String` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func string(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.String? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- /// Optionally retrieves a `Bool` from a path into JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A truthy `Bool` if a value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func bool(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Bool? {
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- /// Optionally retrieves a `[JSON]` from a path into the recieving structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: An `Array` of `JSON` elements if a value could be found,
- /// otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func array(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [JSON]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- /// Optionally decodes many values from a descendant array at a path into
- /// JSON.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: An `Array` of decoded elements if found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func arrayOf(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Decoded]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- /// Optionally retrieves a `[String: JSON]` from a path into the recieving
- /// structure.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing.
- /// - returns: A `Dictionary` of `String` mapping to `JSON` elements if a
- /// value could be found, otherwise `nil`.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func dictionary(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [Swift.String: JSON]? {
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
-}
-
-// MARK: - Missing-with-fallback unpacking
-
-extension JSON {
-
- private func mapOptionalAtPath(path: [JSONPathType], @noescape fallback: () -> Value, @noescape transform: JSON throws -> Value) throws -> Value {
- return try mapOptionalAtPath(path, alongPath: .MissingKeyBecomesNil, transform: transform) ?? fallback()
- }
-
- /// Attempts to decode into the returning type from a path into
- /// JSON, or returns a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript.
- /// - returns: An initialized member from the inner JSON.
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `UnexpectedSubscript`: A given subscript cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of
- /// the `JSON` instance does not match `Decoded`.
- public func decode(path: JSONPathType..., @autoclosure or fallback: () -> Decoded) throws -> Decoded {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Decoded.init)
- }
-
- /// Retrieves a `Double` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: A floating-point `Double`
- /// - throws: One of the `JSON.Error` cases thrown by calling `mapOptionalAtPath(_:fallback:transform:)`.
- /// - seealso: `optionalAtPath(_:ifNotFound)`.
- public func double(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Double) throws -> Swift.Double {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Double.init)
- }
-
- /// Retrieves an `Int` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: A numeric `Int`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func int(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Int) throws -> Swift.Int {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Int.init)
- }
-
- /// Retrieves a `String` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: A textual `String`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func string(path: JSONPathType..., @autoclosure or fallback: () -> Swift.String) throws -> Swift.String {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.String.init)
- }
-
- /// Retrieves a `Bool` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: A truthy `Bool`
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func bool(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Bool) throws -> Swift.Bool {
- return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Bool.init)
- }
-
- /// Retrieves a `[JSON]` from a path into JSON or a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: An `Array` of `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func array(path: JSONPathType..., @autoclosure or fallback: () -> [JSON]) throws -> [JSON] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArray)
- }
-
- /// Attempts to decodes many values from a desendant JSON array at a path
- /// into the recieving structure, returning a fallback if not found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Array to use when one is missing at the subscript.
- /// - returns: An `Array` of decoded elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- /// * Any error that arises from decoding the value.
- public func arrayOf(path: JSONPathType..., @autoclosure or fallback: () -> [Decoded]) throws -> [Decoded] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArrayOf)
- }
-
- /// Retrieves a `[String: JSON]` from a path into JSON or a fallback if not
- /// found.
- /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON`
- /// - parameter fallback: Value to use when one is missing at the subscript
- /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
- /// - throws: One of the following errors contained in `JSON.Error`:
- /// * `KeyNotFound`: A key `path` does not exist inside a descendant
- /// `JSON` dictionary.
- /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a
- /// descendant `JSON` array.
- /// * `UnexpectedSubscript`: A `path` item cannot be used with the
- /// corresponding `JSON` value.
- /// * `TypeNotConvertible`: The target value's type inside of the `JSON`
- /// instance does not match the decoded value.
- public func dictionary(path: JSONPathType..., @autoclosure or fallback: () -> [Swift.String: JSON]) throws -> [Swift.String: JSON] {
- return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getDictionary)
- }
-
-}
-
-// MARK: - Deprecated methods
-
-extension JSON {
-
- @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.MissingKeyBecomesNil]'")
- public func decode(path: JSONPathType..., ifNotFound: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.NullBecomesNil]'")
- public func decode(path: JSONPathType..., ifNull: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init)
- }
-
- @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func double(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Double? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func double(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Double? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init)
- }
-
- @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func int(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Int? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func int(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Int? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init)
- }
-
- @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func string(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.String? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func string(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.String? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init)
- }
-
- @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func bool(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Bool? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func bool(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Bool? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init)
- }
-
- @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func array(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [JSON]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func array(path: JSONPathType..., ifNull: Swift.Bool) throws -> [JSON]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray)
- }
-
- @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func arrayOf(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Decoded]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func arrayOf(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Decoded]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf)
- }
-
- @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.MissingKeyBecomesNil]'")
- public func dictionary(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Swift.String: JSON]? {
- let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
- @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.NullBecomesNil]'")
- public func dictionary(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Swift.String: JSON]? {
- let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : []
- return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary)
- }
-
-}
diff --git a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/main.swift b/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/main.swift
deleted file mode 100644
index f34af41af..000000000
--- a/tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/main.swift
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// main.swift
-// test_Freddy
-//
-// Created by nst on 10/08/16.
-// Copyright © 2016 Nicolas Seriot. All rights reserved.
-//
-
-import Foundation
-
-func main() {
-
- guard Process.arguments.count == 2 else {
- let url = NSURL(fileURLWithPath: Process.arguments[0])
- guard let programName = url.lastPathComponent else { exit(1) }
- print("Usage: ./\(programName) file.json")
- exit(1)
- }
-
- let path = Process.arguments[1]
- let url = NSURL.fileURLWithPath(path)
-
- guard let data = NSData(contentsOfURL:url) else {
- print("*** CANNOT READ DATA AT \(url)")
- return
- }
-
- var p = JSONParser(utf8Data: data)
- do {
- try p.parse()
- exit(0)
- } catch {
- exit(1)
- }
-}
-
-main()
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.h b/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.h
deleted file mode 100644
index 71bd0c3b7..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.h
+++ /dev/null
@@ -1,251 +0,0 @@
-//
-// JSONKit.h
-// http://github.com/johnezang/JSONKit
-// Dual licensed under either the terms of the BSD License, or alternatively
-// under the terms of the Apache License, Version 2.0, as specified below.
-//
-
-/*
- Copyright (c) 2011, John Engelhart
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the Zang Industries nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Copyright 2011 John Engelhart
-
- 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.
-*/
-
-#include
-#include
-#include
-#include
-#include
-
-#ifdef __OBJC__
-#import
-#import
-#import
-#import
-#import
-#import
-#endif // __OBJC__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-// For Mac OS X < 10.5.
-#ifndef NSINTEGER_DEFINED
-#define NSINTEGER_DEFINED
-#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#define NSIntegerMin LONG_MIN
-#define NSIntegerMax LONG_MAX
-#define NSUIntegerMax ULONG_MAX
-#else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#define NSIntegerMin INT_MIN
-#define NSIntegerMax INT_MAX
-#define NSUIntegerMax UINT_MAX
-#endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
-#endif // NSINTEGER_DEFINED
-
-
-#ifndef _JSONKIT_H_
-#define _JSONKIT_H_
-
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465)
-#define JK_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
-#else
-#define JK_DEPRECATED_ATTRIBUTE
-#endif
-
-#define JSONKIT_VERSION_MAJOR 1
-#define JSONKIT_VERSION_MINOR 4
-
-typedef NSUInteger JKFlags;
-
-/*
- JKParseOptionComments : Allow C style // and /_* ... *_/ (without a _, obviously) comments in JSON.
- JKParseOptionUnicodeNewlines : Allow Unicode recommended (?:\r\n|[\n\v\f\r\x85\p{Zl}\p{Zp}]) newlines.
- JKParseOptionLooseUnicode : Normally the decoder will stop with an error at any malformed Unicode.
- This option allows JSON with malformed Unicode to be parsed without reporting an error.
- Any malformed Unicode is replaced with \uFFFD, or "REPLACEMENT CHARACTER".
- */
-
-enum {
- JKParseOptionNone = 0,
- JKParseOptionStrict = 0,
- JKParseOptionComments = (1 << 0),
- JKParseOptionUnicodeNewlines = (1 << 1),
- JKParseOptionLooseUnicode = (1 << 2),
- JKParseOptionPermitTextAfterValidJSON = (1 << 3),
- JKParseOptionValidFlags = (JKParseOptionComments | JKParseOptionUnicodeNewlines | JKParseOptionLooseUnicode | JKParseOptionPermitTextAfterValidJSON),
-};
-typedef JKFlags JKParseOptionFlags;
-
-enum {
- JKSerializeOptionNone = 0,
- JKSerializeOptionPretty = (1 << 0),
- JKSerializeOptionEscapeUnicode = (1 << 1),
- JKSerializeOptionEscapeForwardSlashes = (1 << 4),
- JKSerializeOptionValidFlags = (JKSerializeOptionPretty | JKSerializeOptionEscapeUnicode | JKSerializeOptionEscapeForwardSlashes),
-};
-typedef JKFlags JKSerializeOptionFlags;
-
-#ifdef __OBJC__
-
-typedef struct JKParseState JKParseState; // Opaque internal, private type.
-
-// As a general rule of thumb, if you use a method that doesn't accept a JKParseOptionFlags argument, it defaults to JKParseOptionStrict
-
-@interface JSONDecoder : NSObject {
- JKParseState *parseState;
-}
-+ (id)decoder;
-+ (id)decoderWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (id)initWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (void)clearCache;
-
-// The parse... methods were deprecated in v1.4 in favor of the v1.4 objectWith... methods.
-- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length: instead.
-- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length:error: instead.
-// The NSData MUST be UTF8 encoded JSON.
-- (id)parseJSONData:(NSData *)jsonData JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData: instead.
-- (id)parseJSONData:(NSData *)jsonData error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData:error: instead.
-
-// Methods that return immutable collection objects.
-- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length;
-- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error;
-// The NSData MUST be UTF8 encoded JSON.
-- (id)objectWithData:(NSData *)jsonData;
-- (id)objectWithData:(NSData *)jsonData error:(NSError **)error;
-
-// Methods that return mutable collection objects.
-- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length;
-- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error;
-// The NSData MUST be UTF8 encoded JSON.
-- (id)mutableObjectWithData:(NSData *)jsonData;
-- (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error;
-
-@end
-
-////////////
-#pragma mark Deserializing methods
-////////////
-
-@interface NSString (JSONKitDeserializing)
-- (id)objectFromJSONString;
-- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
-- (id)mutableObjectFromJSONString;
-- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
-@end
-
-@interface NSData (JSONKitDeserializing)
-// The NSData MUST be UTF8 encoded JSON.
-- (id)objectFromJSONData;
-- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
-- (id)mutableObjectFromJSONData;
-- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
-- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
-@end
-
-////////////
-#pragma mark Serializing methods
-////////////
-
-@interface NSString (JSONKitSerializing)
-// Convenience methods for those that need to serialize the receiving NSString (i.e., instead of having to serialize a NSArray with a single NSString, you can "serialize to JSON" just the NSString).
-// Normally, a string that is serialized to JSON has quotation marks surrounding it, which you may or may not want when serializing a single string, and can be controlled with includeQuotes:
-// includeQuotes:YES `a "test"...` -> `"a \"test\"..."`
-// includeQuotes:NO `a "test"...` -> `a \"test\"...`
-- (NSData *)JSONData; // Invokes JSONDataWithOptions:JKSerializeOptionNone includeQuotes:YES
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
-- (NSString *)JSONString; // Invokes JSONStringWithOptions:JKSerializeOptionNone includeQuotes:YES
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
-@end
-
-@interface NSArray (JSONKitSerializing)
-- (NSData *)JSONData;
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-- (NSString *)JSONString;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-@end
-
-@interface NSDictionary (JSONKitSerializing)
-- (NSData *)JSONData;
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-- (NSString *)JSONString;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-@end
-
-#ifdef __BLOCKS__
-
-@interface NSArray (JSONKitSerializingBlockAdditions)
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
-@end
-
-@interface NSDictionary (JSONKitSerializingBlockAdditions)
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
-@end
-
-#endif
-
-
-#endif // __OBJC__
-
-#endif // _JSONKIT_H_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.m b/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.m
deleted file mode 100644
index 4994caf97..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/JSONKit.m
+++ /dev/null
@@ -1,3065 +0,0 @@
-//
-// JSONKit.m
-// http://github.com/johnezang/JSONKit
-// Dual licensed under either the terms of the BSD License, or alternatively
-// under the terms of the Apache License, Version 2.0, as specified below.
-//
-
-/*
- Copyright (c) 2011, John Engelhart
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the Zang Industries nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Copyright 2011 John Engelhart
-
- 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.
-*/
-
-
-/*
- Acknowledgments:
-
- The bulk of the UTF8 / UTF32 conversion and verification comes
- from ConvertUTF.[hc]. It has been modified from the original sources.
-
- The original sources were obtained from http://www.unicode.org/.
- However, the web site no longer seems to host the files. Instead,
- the Unicode FAQ http://www.unicode.org/faq//utf_bom.html#gen4
- points to International Components for Unicode (ICU)
- http://site.icu-project.org/ as an example of how to write a UTF
- converter.
-
- The decision to use the ConvertUTF.[ch] code was made to leverage
- "proven" code. Hopefully the local modifications are bug free.
-
- The code in isValidCodePoint() is derived from the ICU code in
- utf.h for the macros U_IS_UNICODE_NONCHAR and U_IS_UNICODE_CHAR.
-
- From the original ConvertUTF.[ch]:
-
- * Copyright 2001-2004 Unicode, Inc.
- *
- * Disclaimer
- *
- * This source code is provided as is by Unicode, Inc. No claims are
- * made as to fitness for any particular purpose. No warranties of any
- * kind are expressed or implied. The recipient agrees to determine
- * applicability of information provided. If this file has been
- * purchased on magnetic or optical media from Unicode, Inc., the
- * sole remedy for any claim will be exchange of defective media
- * within 90 days of receipt.
- *
- * Limitations on Rights to Redistribute This Code
- *
- * Unicode, Inc. hereby grants the right to freely use the information
- * supplied in this file in the creation of products supporting the
- * Unicode Standard, and to make copies of this file in any form
- * for internal or external distribution as long as this notice
- * remains attached.
-
-*/
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#import "JSONKit.h"
-
-//#include
-#include
-#include
-#include
-#include
-
-//#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
-
-#ifdef JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS
-#warning As of JSONKit v1.4, JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS is no longer required. It is no longer a valid option.
-#endif
-
-#ifdef __OBJC_GC__
-#error JSONKit does not support Objective-C Garbage Collection
-#endif
-
-#if __has_feature(objc_arc)
-#error JSONKit does not support Objective-C Automatic Reference Counting (ARC)
-#endif
-
-// The following checks are really nothing more than sanity checks.
-// JSONKit technically has a few problems from a "strictly C99 conforming" standpoint, though they are of the pedantic nitpicking variety.
-// In practice, though, for the compilers and architectures we can reasonably expect this code to be compiled for, these pedantic nitpicks aren't really a problem.
-// Since we're limited as to what we can do with pre-processor #if checks, these checks are not nearly as through as they should be.
-
-#if (UINT_MAX != 0xffffffffU) || (INT_MIN != (-0x7fffffff-1)) || (ULLONG_MAX != 0xffffffffffffffffULL) || (LLONG_MIN != (-0x7fffffffffffffffLL-1LL))
-#error JSONKit requires the C 'int' and 'long long' types to be 32 and 64 bits respectively.
-#endif
-
-#if !defined(__LP64__) && ((UINT_MAX != ULONG_MAX) || (INT_MAX != LONG_MAX) || (INT_MIN != LONG_MIN) || (WORD_BIT != LONG_BIT))
-#error JSONKit requires the C 'int' and 'long' types to be the same on 32-bit architectures.
-#endif
-
-// Cocoa / Foundation uses NS*Integer as the type for a lot of arguments. We make sure that NS*Integer is something we are expecting and is reasonably compatible with size_t / ssize_t
-
-#if (NSUIntegerMax != ULONG_MAX) || (NSIntegerMax != LONG_MAX) || (NSIntegerMin != LONG_MIN)
-#error JSONKit requires NSInteger and NSUInteger to be the same size as the C 'long' type.
-#endif
-
-#if (NSUIntegerMax != SIZE_MAX) || (NSIntegerMax != SSIZE_MAX)
-#error JSONKit requires NSInteger and NSUInteger to be the same size as the C 'size_t' type.
-#endif
-
-
-// For DJB hash.
-#define JK_HASH_INIT (1402737925UL)
-
-// Use __builtin_clz() instead of trailingBytesForUTF8[] table lookup.
-#define JK_FAST_TRAILING_BYTES
-
-// JK_CACHE_SLOTS must be a power of 2. Default size is 1024 slots.
-#define JK_CACHE_SLOTS_BITS (10)
-#define JK_CACHE_SLOTS (1UL << JK_CACHE_SLOTS_BITS)
-// JK_CACHE_PROBES is the number of probe attempts.
-#define JK_CACHE_PROBES (4UL)
-// JK_INIT_CACHE_AGE must be < (1 << AGE) - 1, where AGE is sizeof(typeof(AGE)) * 8.
-#define JK_INIT_CACHE_AGE (0)
-
-// JK_TOKENBUFFER_SIZE is the default stack size for the temporary buffer used to hold "non-simple" strings (i.e., contains \ escapes)
-#define JK_TOKENBUFFER_SIZE (1024UL * 2UL)
-
-// JK_STACK_OBJS is the default number of spaces reserved on the stack for temporarily storing pointers to Obj-C objects before they can be transferred to a NSArray / NSDictionary.
-#define JK_STACK_OBJS (1024UL * 1UL)
-
-#define JK_JSONBUFFER_SIZE (1024UL * 4UL)
-#define JK_UTF8BUFFER_SIZE (1024UL * 16UL)
-
-#define JK_ENCODE_CACHE_SLOTS (1024UL)
-
-
-#if defined (__GNUC__) && (__GNUC__ >= 4)
-#define JK_ATTRIBUTES(attr, ...) __attribute__((attr, ##__VA_ARGS__))
-#define JK_EXPECTED(cond, expect) __builtin_expect((long)(cond), (expect))
-#define JK_EXPECT_T(cond) JK_EXPECTED(cond, 1U)
-#define JK_EXPECT_F(cond) JK_EXPECTED(cond, 0U)
-#define JK_PREFETCH(ptr) __builtin_prefetch(ptr)
-#else // defined (__GNUC__) && (__GNUC__ >= 4)
-#define JK_ATTRIBUTES(attr, ...)
-#define JK_EXPECTED(cond, expect) (cond)
-#define JK_EXPECT_T(cond) (cond)
-#define JK_EXPECT_F(cond) (cond)
-#define JK_PREFETCH(ptr)
-#endif // defined (__GNUC__) && (__GNUC__ >= 4)
-
-#define JK_STATIC_INLINE static __inline__ JK_ATTRIBUTES(always_inline)
-#define JK_ALIGNED(arg) JK_ATTRIBUTES(aligned(arg))
-#define JK_UNUSED_ARG JK_ATTRIBUTES(unused)
-#define JK_WARN_UNUSED JK_ATTRIBUTES(warn_unused_result)
-#define JK_WARN_UNUSED_CONST JK_ATTRIBUTES(warn_unused_result, const)
-#define JK_WARN_UNUSED_PURE JK_ATTRIBUTES(warn_unused_result, pure)
-#define JK_WARN_UNUSED_SENTINEL JK_ATTRIBUTES(warn_unused_result, sentinel)
-#define JK_NONNULL_ARGS(arg, ...) JK_ATTRIBUTES(nonnull(arg, ##__VA_ARGS__))
-#define JK_WARN_UNUSED_NONNULL_ARGS(arg, ...) JK_ATTRIBUTES(warn_unused_result, nonnull(arg, ##__VA_ARGS__))
-#define JK_WARN_UNUSED_CONST_NONNULL_ARGS(arg, ...) JK_ATTRIBUTES(warn_unused_result, const, nonnull(arg, ##__VA_ARGS__))
-#define JK_WARN_UNUSED_PURE_NONNULL_ARGS(arg, ...) JK_ATTRIBUTES(warn_unused_result, pure, nonnull(arg, ##__VA_ARGS__))
-
-#if defined (__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
-#define JK_ALLOC_SIZE_NON_NULL_ARGS_WARN_UNUSED(as, nn, ...) JK_ATTRIBUTES(warn_unused_result, nonnull(nn, ##__VA_ARGS__), alloc_size(as))
-#else // defined (__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
-#define JK_ALLOC_SIZE_NON_NULL_ARGS_WARN_UNUSED(as, nn, ...) JK_ATTRIBUTES(warn_unused_result, nonnull(nn, ##__VA_ARGS__))
-#endif // defined (__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
-
-
-@class JKArray, JKDictionaryEnumerator, JKDictionary;
-
-enum {
- JSONNumberStateStart = 0,
- JSONNumberStateFinished = 1,
- JSONNumberStateError = 2,
- JSONNumberStateWholeNumberStart = 3,
- JSONNumberStateWholeNumberMinus = 4,
- JSONNumberStateWholeNumberZero = 5,
- JSONNumberStateWholeNumber = 6,
- JSONNumberStatePeriod = 7,
- JSONNumberStateFractionalNumberStart = 8,
- JSONNumberStateFractionalNumber = 9,
- JSONNumberStateExponentStart = 10,
- JSONNumberStateExponentPlusMinus = 11,
- JSONNumberStateExponent = 12,
-};
-
-enum {
- JSONStringStateStart = 0,
- JSONStringStateParsing = 1,
- JSONStringStateFinished = 2,
- JSONStringStateError = 3,
- JSONStringStateEscape = 4,
- JSONStringStateEscapedUnicode1 = 5,
- JSONStringStateEscapedUnicode2 = 6,
- JSONStringStateEscapedUnicode3 = 7,
- JSONStringStateEscapedUnicode4 = 8,
- JSONStringStateEscapedUnicodeSurrogate1 = 9,
- JSONStringStateEscapedUnicodeSurrogate2 = 10,
- JSONStringStateEscapedUnicodeSurrogate3 = 11,
- JSONStringStateEscapedUnicodeSurrogate4 = 12,
- JSONStringStateEscapedNeedEscapeForSurrogate = 13,
- JSONStringStateEscapedNeedEscapedUForSurrogate = 14,
-};
-
-enum {
- JKParseAcceptValue = (1 << 0),
- JKParseAcceptComma = (1 << 1),
- JKParseAcceptEnd = (1 << 2),
- JKParseAcceptValueOrEnd = (JKParseAcceptValue | JKParseAcceptEnd),
- JKParseAcceptCommaOrEnd = (JKParseAcceptComma | JKParseAcceptEnd),
-};
-
-enum {
- JKClassUnknown = 0,
- JKClassString = 1,
- JKClassNumber = 2,
- JKClassArray = 3,
- JKClassDictionary = 4,
- JKClassNull = 5,
-};
-
-enum {
- JKManagedBufferOnStack = 1,
- JKManagedBufferOnHeap = 2,
- JKManagedBufferLocationMask = (0x3),
- JKManagedBufferLocationShift = (0),
-
- JKManagedBufferMustFree = (1 << 2),
-};
-typedef JKFlags JKManagedBufferFlags;
-
-enum {
- JKObjectStackOnStack = 1,
- JKObjectStackOnHeap = 2,
- JKObjectStackLocationMask = (0x3),
- JKObjectStackLocationShift = (0),
-
- JKObjectStackMustFree = (1 << 2),
-};
-typedef JKFlags JKObjectStackFlags;
-
-enum {
- JKTokenTypeInvalid = 0,
- JKTokenTypeNumber = 1,
- JKTokenTypeString = 2,
- JKTokenTypeObjectBegin = 3,
- JKTokenTypeObjectEnd = 4,
- JKTokenTypeArrayBegin = 5,
- JKTokenTypeArrayEnd = 6,
- JKTokenTypeSeparator = 7,
- JKTokenTypeComma = 8,
- JKTokenTypeTrue = 9,
- JKTokenTypeFalse = 10,
- JKTokenTypeNull = 11,
- JKTokenTypeWhiteSpace = 12,
-};
-typedef NSUInteger JKTokenType;
-
-// These are prime numbers to assist with hash slot probing.
-enum {
- JKValueTypeNone = 0,
- JKValueTypeString = 5,
- JKValueTypeLongLong = 7,
- JKValueTypeUnsignedLongLong = 11,
- JKValueTypeDouble = 13,
-};
-typedef NSUInteger JKValueType;
-
-enum {
- JKEncodeOptionAsData = 1,
- JKEncodeOptionAsString = 2,
- JKEncodeOptionAsTypeMask = 0x7,
- JKEncodeOptionCollectionObj = (1 << 3),
- JKEncodeOptionStringObj = (1 << 4),
- JKEncodeOptionStringObjTrimQuotes = (1 << 5),
-
-};
-typedef NSUInteger JKEncodeOptionType;
-
-typedef NSUInteger JKHash;
-
-typedef struct JKTokenCacheItem JKTokenCacheItem;
-typedef struct JKTokenCache JKTokenCache;
-typedef struct JKTokenValue JKTokenValue;
-typedef struct JKParseToken JKParseToken;
-typedef struct JKPtrRange JKPtrRange;
-typedef struct JKObjectStack JKObjectStack;
-typedef struct JKBuffer JKBuffer;
-typedef struct JKConstBuffer JKConstBuffer;
-typedef struct JKConstPtrRange JKConstPtrRange;
-typedef struct JKRange JKRange;
-typedef struct JKManagedBuffer JKManagedBuffer;
-typedef struct JKFastClassLookup JKFastClassLookup;
-typedef struct JKEncodeCache JKEncodeCache;
-typedef struct JKEncodeState JKEncodeState;
-typedef struct JKObjCImpCache JKObjCImpCache;
-typedef struct JKHashTableEntry JKHashTableEntry;
-
-typedef id (*NSNumberAllocImp)(id receiver, SEL selector);
-typedef id (*NSNumberInitWithUnsignedLongLongImp)(id receiver, SEL selector, unsigned long long value);
-typedef id (*JKClassFormatterIMP)(id receiver, SEL selector, id object);
-#ifdef __BLOCKS__
-typedef id (^JKClassFormatterBlock)(id formatObject);
-#endif
-
-
-struct JKPtrRange {
- unsigned char *ptr;
- size_t length;
-};
-
-struct JKConstPtrRange {
- const unsigned char *ptr;
- size_t length;
-};
-
-struct JKRange {
- size_t location, length;
-};
-
-struct JKManagedBuffer {
- JKPtrRange bytes;
- JKManagedBufferFlags flags;
- size_t roundSizeUpToMultipleOf;
-};
-
-struct JKObjectStack {
- void **objects, **keys;
- CFHashCode *cfHashes;
- size_t count, index, roundSizeUpToMultipleOf;
- JKObjectStackFlags flags;
-};
-
-struct JKBuffer {
- JKPtrRange bytes;
-};
-
-struct JKConstBuffer {
- JKConstPtrRange bytes;
-};
-
-struct JKTokenValue {
- JKConstPtrRange ptrRange;
- JKValueType type;
- JKHash hash;
- union {
- long long longLongValue;
- unsigned long long unsignedLongLongValue;
- double doubleValue;
- } number;
- JKTokenCacheItem *cacheItem;
-};
-
-struct JKParseToken {
- JKConstPtrRange tokenPtrRange;
- JKTokenType type;
- JKTokenValue value;
- JKManagedBuffer tokenBuffer;
-};
-
-struct JKTokenCacheItem {
- void *object;
- JKHash hash;
- CFHashCode cfHash;
- size_t size;
- unsigned char *bytes;
- JKValueType type;
-};
-
-struct JKTokenCache {
- JKTokenCacheItem *items;
- size_t count;
- unsigned int prng_lfsr;
- unsigned char age[JK_CACHE_SLOTS];
-};
-
-struct JKObjCImpCache {
- Class NSNumberClass;
- NSNumberAllocImp NSNumberAlloc;
- NSNumberInitWithUnsignedLongLongImp NSNumberInitWithUnsignedLongLong;
-};
-
-struct JKParseState {
- JKParseOptionFlags parseOptionFlags;
- JKConstBuffer stringBuffer;
- size_t atIndex, lineNumber, lineStartIndex;
- size_t prev_atIndex, prev_lineNumber, prev_lineStartIndex;
- JKParseToken token;
- JKObjectStack objectStack;
- JKTokenCache cache;
- JKObjCImpCache objCImpCache;
- NSError *error;
- int errorIsPrev;
- BOOL mutableCollections;
-};
-
-struct JKFastClassLookup {
- void *stringClass;
- void *numberClass;
- void *arrayClass;
- void *dictionaryClass;
- void *nullClass;
-};
-
-struct JKEncodeCache {
- id object;
- size_t offset;
- size_t length;
-};
-
-struct JKEncodeState {
- JKManagedBuffer utf8ConversionBuffer;
- JKManagedBuffer stringBuffer;
- size_t atIndex;
- JKFastClassLookup fastClassLookup;
- JKEncodeCache cache[JK_ENCODE_CACHE_SLOTS];
- JKSerializeOptionFlags serializeOptionFlags;
- JKEncodeOptionType encodeOption;
- size_t depth;
- NSError *error;
- id classFormatterDelegate;
- SEL classFormatterSelector;
- JKClassFormatterIMP classFormatterIMP;
-#ifdef __BLOCKS__
- JKClassFormatterBlock classFormatterBlock;
-#endif
-};
-
-// This is a JSONKit private class.
-@interface JKSerializer : NSObject {
- JKEncodeState *encodeState;
-}
-
-#ifdef __BLOCKS__
-#define JKSERIALIZER_BLOCKS_PROTO id(^)(id object)
-#else
-#define JKSERIALIZER_BLOCKS_PROTO id
-#endif
-
-+ (id)serializeObject:(id)object options:(JKSerializeOptionFlags)optionFlags encodeOption:(JKEncodeOptionType)encodeOption block:(JKSERIALIZER_BLOCKS_PROTO)block delegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-- (id)serializeObject:(id)object options:(JKSerializeOptionFlags)optionFlags encodeOption:(JKEncodeOptionType)encodeOption block:(JKSERIALIZER_BLOCKS_PROTO)block delegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
-- (void)releaseState;
-
-@end
-
-struct JKHashTableEntry {
- NSUInteger keyHash;
- id key, object;
-};
-
-
-typedef uint32_t UTF32; /* at least 32 bits */
-typedef uint16_t UTF16; /* at least 16 bits */
-typedef uint8_t UTF8; /* typically 8 bits */
-
-typedef enum {
- conversionOK, /* conversion successful */
- sourceExhausted, /* partial character in source, but hit end */
- targetExhausted, /* insuff. room in target for conversion */
- sourceIllegal /* source sequence is illegal/malformed */
-} ConversionResult;
-
-#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
-#define UNI_MAX_BMP (UTF32)0x0000FFFF
-#define UNI_MAX_UTF16 (UTF32)0x0010FFFF
-#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
-#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
-#define UNI_SUR_HIGH_START (UTF32)0xD800
-#define UNI_SUR_HIGH_END (UTF32)0xDBFF
-#define UNI_SUR_LOW_START (UTF32)0xDC00
-#define UNI_SUR_LOW_END (UTF32)0xDFFF
-
-
-#if !defined(JK_FAST_TRAILING_BYTES)
-static const char trailingBytesForUTF8[256] = {
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
-};
-#endif
-
-static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
-static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
-
-#define JK_AT_STRING_PTR(x) (&((x)->stringBuffer.bytes.ptr[(x)->atIndex]))
-#define JK_END_STRING_PTR(x) (&((x)->stringBuffer.bytes.ptr[(x)->stringBuffer.bytes.length]))
-
-
-static JKArray *_JKArrayCreate(id *objects, NSUInteger count, BOOL mutableCollection);
-static void _JKArrayInsertObjectAtIndex(JKArray *array, id newObject, NSUInteger objectIndex);
-static void _JKArrayReplaceObjectAtIndexWithObject(JKArray *array, NSUInteger objectIndex, id newObject);
-static void _JKArrayRemoveObjectAtIndex(JKArray *array, NSUInteger objectIndex);
-
-
-static NSUInteger _JKDictionaryCapacityForCount(NSUInteger count);
-static JKDictionary *_JKDictionaryCreate(id *keys, NSUInteger *keyHashes, id *objects, NSUInteger count, BOOL mutableCollection);
-static JKHashTableEntry *_JKDictionaryHashEntry(JKDictionary *dictionary);
-static NSUInteger _JKDictionaryCapacity(JKDictionary *dictionary);
-static void _JKDictionaryResizeIfNeccessary(JKDictionary *dictionary);
-static void _JKDictionaryRemoveObjectWithEntry(JKDictionary *dictionary, JKHashTableEntry *entry);
-static void _JKDictionaryAddObject(JKDictionary *dictionary, NSUInteger keyHash, id key, id object);
-static JKHashTableEntry *_JKDictionaryHashTableEntryForKey(JKDictionary *dictionary, id aKey);
-
-
-static void _JSONDecoderCleanup(JSONDecoder *decoder);
-
-static id _NSStringObjectFromJSONString(NSString *jsonString, JKParseOptionFlags parseOptionFlags, NSError **error, BOOL mutableCollection);
-
-
-static void jk_managedBuffer_release(JKManagedBuffer *managedBuffer);
-static void jk_managedBuffer_setToStackBuffer(JKManagedBuffer *managedBuffer, unsigned char *ptr, size_t length);
-static unsigned char *jk_managedBuffer_resize(JKManagedBuffer *managedBuffer, size_t newSize);
-static void jk_objectStack_release(JKObjectStack *objectStack);
-static void jk_objectStack_setToStackBuffer(JKObjectStack *objectStack, void **objects, void **keys, CFHashCode *cfHashes, size_t count);
-static int jk_objectStack_resize(JKObjectStack *objectStack, size_t newCount);
-
-static void jk_error(JKParseState *parseState, NSString *format, ...);
-static int jk_parse_string(JKParseState *parseState);
-static int jk_parse_number(JKParseState *parseState);
-static size_t jk_parse_is_newline(JKParseState *parseState, const unsigned char *atCharacterPtr);
-JK_STATIC_INLINE int jk_parse_skip_newline(JKParseState *parseState);
-JK_STATIC_INLINE void jk_parse_skip_whitespace(JKParseState *parseState);
-static int jk_parse_next_token(JKParseState *parseState);
-static void jk_error_parse_accept_or3(JKParseState *parseState, int state, NSString *or1String, NSString *or2String, NSString *or3String);
-static void *jk_create_dictionary(JKParseState *parseState, size_t startingObjectIndex);
-static void *jk_parse_dictionary(JKParseState *parseState);
-static void *jk_parse_array(JKParseState *parseState);
-static void *jk_object_for_token(JKParseState *parseState);
-static void *jk_cachedObjects(JKParseState *parseState);
-JK_STATIC_INLINE void jk_cache_age(JKParseState *parseState);
-JK_STATIC_INLINE void jk_set_parsed_token(JKParseState *parseState, const unsigned char *ptr, size_t length, JKTokenType type, size_t advanceBy);
-
-
-static void jk_encode_error(JKEncodeState *encodeState, NSString *format, ...);
-static int jk_encode_printf(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format, ...);
-static int jk_encode_write(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format);
-static int jk_encode_writePrettyPrintWhiteSpace(JKEncodeState *encodeState);
-static int jk_encode_write1slow(JKEncodeState *encodeState, ssize_t depthChange, const char *format);
-static int jk_encode_write1fast(JKEncodeState *encodeState, ssize_t depthChange JK_UNUSED_ARG, const char *format);
-static int jk_encode_writen(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format, size_t length);
-JK_STATIC_INLINE JKHash jk_encode_object_hash(void *objectPtr);
-JK_STATIC_INLINE void jk_encode_updateCache(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object);
-static int jk_encode_add_atom_to_buffer(JKEncodeState *encodeState, void *objectPtr);
-
-#define jk_encode_write1(es, dc, f) (JK_EXPECT_F(_jk_encode_prettyPrint) ? jk_encode_write1slow(es, dc, f) : jk_encode_write1fast(es, dc, f))
-
-
-JK_STATIC_INLINE size_t jk_min(size_t a, size_t b);
-JK_STATIC_INLINE size_t jk_max(size_t a, size_t b);
-JK_STATIC_INLINE JKHash jk_calculateHash(JKHash currentHash, unsigned char c);
-
-// JSONKit v1.4 used both a JKArray : NSArray and JKMutableArray : NSMutableArray, and the same for the dictionary collection type.
-// However, Louis Gerbarg (via cocoa-dev) pointed out that Cocoa / Core Foundation actually implements only a single class that inherits from the
-// mutable version, and keeps an ivar bit for whether or not that instance is mutable. This means that the immutable versions of the collection
-// classes receive the mutating methods, but this is handled by having those methods throw an exception when the ivar bit is set to immutable.
-// We adopt the same strategy here. It's both cleaner and gets rid of the method swizzling hackery used in JSONKit v1.4.
-
-
-// This is a workaround for issue #23 https://github.com/johnezang/JSONKit/pull/23
-// Basically, there seem to be a problem with using +load in static libraries on iOS. However, __attribute__ ((constructor)) does work correctly.
-// Since we do not require anything "special" that +load provides, and we can accomplish the same thing using __attribute__ ((constructor)), the +load logic was moved here.
-
-static Class _JKArrayClass = NULL;
-static size_t _JKArrayInstanceSize = 0UL;
-static Class _JKDictionaryClass = NULL;
-static size_t _JKDictionaryInstanceSize = 0UL;
-
-// For JSONDecoder...
-static Class _jk_NSNumberClass = NULL;
-static NSNumberAllocImp _jk_NSNumberAllocImp = NULL;
-static NSNumberInitWithUnsignedLongLongImp _jk_NSNumberInitWithUnsignedLongLongImp = NULL;
-
-extern void jk_collectionClassLoadTimeInitialization(void) __attribute__ ((constructor));
-
-void jk_collectionClassLoadTimeInitialization(void) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Though technically not required, the run time environment at load time initialization may be less than ideal.
-
- _JKArrayClass = objc_getClass("JKArray");
- _JKArrayInstanceSize = jk_max(16UL, class_getInstanceSize(_JKArrayClass));
-
- _JKDictionaryClass = objc_getClass("JKDictionary");
- _JKDictionaryInstanceSize = jk_max(16UL, class_getInstanceSize(_JKDictionaryClass));
-
- // For JSONDecoder...
- _jk_NSNumberClass = [NSNumber class];
- _jk_NSNumberAllocImp = (NSNumberAllocImp)[NSNumber methodForSelector:@selector(alloc)];
-
- // Hacktacular. Need to do it this way due to the nature of class clusters.
- id temp_NSNumber = [NSNumber alloc];
- _jk_NSNumberInitWithUnsignedLongLongImp = (NSNumberInitWithUnsignedLongLongImp)[temp_NSNumber methodForSelector:@selector(initWithUnsignedLongLong:)];
- [[temp_NSNumber init] release];
- temp_NSNumber = NULL;
-
- [pool release]; pool = NULL;
-}
-
-
-#pragma mark -
-@interface JKArray : NSMutableArray {
- id *objects;
- NSUInteger count, capacity, mutations;
-}
-@end
-
-@implementation JKArray
-
-+ (id)allocWithZone:(NSZone *)zone
-{
-#pragma unused(zone)
- [NSException raise:NSInvalidArgumentException format:@"*** - [%@ %@]: The %@ class is private to JSONKit and should not be used in this fashion.", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSStringFromClass([self class])];
- return(NULL);
-}
-
-static JKArray *_JKArrayCreate(id *objects, NSUInteger count, BOOL mutableCollection) {
- NSCParameterAssert((objects != NULL) && (_JKArrayClass != NULL) && (_JKArrayInstanceSize > 0UL));
- JKArray *array = NULL;
- if(JK_EXPECT_T((array = (JKArray *)calloc(1UL, _JKArrayInstanceSize)) != NULL)) { // Directly allocate the JKArray instance via calloc.
- object_setClass(array, _JKArrayClass);
- if((array = [array init]) == NULL) { return(NULL); }
- array->capacity = count;
- array->count = count;
- if(JK_EXPECT_F((array->objects = (id *)malloc(sizeof(id) * array->capacity)) == NULL)) { [array autorelease]; return(NULL); }
- memcpy(array->objects, objects, array->capacity * sizeof(id));
- array->mutations = (mutableCollection == NO) ? 0UL : 1UL;
- }
- return(array);
-}
-
-// Note: The caller is responsible for -retaining the object that is to be added.
-static void _JKArrayInsertObjectAtIndex(JKArray *array, id newObject, NSUInteger objectIndex) {
- NSCParameterAssert((array != NULL) && (array->objects != NULL) && (array->count <= array->capacity) && (objectIndex <= array->count) && (newObject != NULL));
- if(!((array != NULL) && (array->objects != NULL) && (objectIndex <= array->count) && (newObject != NULL))) { [newObject autorelease]; return; }
- if((array->count + 1UL) >= array->capacity) {
- id *newObjects = NULL;
- if((newObjects = (id *)realloc(array->objects, sizeof(id) * (array->capacity + 16UL))) == NULL) { [NSException raise:NSMallocException format:@"Unable to resize objects array."]; }
- array->objects = newObjects;
- array->capacity += 16UL;
- memset(&array->objects[array->count], 0, sizeof(id) * (array->capacity - array->count));
- }
- array->count++;
- if((objectIndex + 1UL) < array->count) { memmove(&array->objects[objectIndex + 1UL], &array->objects[objectIndex], sizeof(id) * ((array->count - 1UL) - objectIndex)); array->objects[objectIndex] = NULL; }
- array->objects[objectIndex] = newObject;
-}
-
-// Note: The caller is responsible for -retaining the object that is to be added.
-static void _JKArrayReplaceObjectAtIndexWithObject(JKArray *array, NSUInteger objectIndex, id newObject) {
- NSCParameterAssert((array != NULL) && (array->objects != NULL) && (array->count <= array->capacity) && (objectIndex < array->count) && (array->objects[objectIndex] != NULL) && (newObject != NULL));
- if(!((array != NULL) && (array->objects != NULL) && (objectIndex < array->count) && (array->objects[objectIndex] != NULL) && (newObject != NULL))) { [newObject autorelease]; return; }
- CFRelease(array->objects[objectIndex]);
- array->objects[objectIndex] = NULL;
- array->objects[objectIndex] = newObject;
-}
-
-static void _JKArrayRemoveObjectAtIndex(JKArray *array, NSUInteger objectIndex) {
- NSCParameterAssert((array != NULL) && (array->objects != NULL) && (array->count > 0UL) && (array->count <= array->capacity) && (objectIndex < array->count) && (array->objects[objectIndex] != NULL));
- if(!((array != NULL) && (array->objects != NULL) && (array->count > 0UL) && (array->count <= array->capacity) && (objectIndex < array->count) && (array->objects[objectIndex] != NULL))) { return; }
- CFRelease(array->objects[objectIndex]);
- array->objects[objectIndex] = NULL;
- if((objectIndex + 1UL) < array->count) { memmove(&array->objects[objectIndex], &array->objects[objectIndex + 1UL], sizeof(id) * ((array->count - 1UL) - objectIndex)); array->objects[array->count - 1UL] = NULL; }
- array->count--;
-}
-
-- (void)dealloc
-{
- if(JK_EXPECT_T(objects != NULL)) {
- NSUInteger atObject = 0UL;
- for(atObject = 0UL; atObject < count; atObject++) { if(JK_EXPECT_T(objects[atObject] != NULL)) { CFRelease(objects[atObject]); objects[atObject] = NULL; } }
- free(objects); objects = NULL;
- }
-
- [super dealloc];
-}
-
-- (NSUInteger)count
-{
- NSParameterAssert((objects != NULL) && (count <= capacity));
- return(count);
-}
-
-- (void)getObjects:(id *)objectsPtr range:(NSRange)range
-{
- NSParameterAssert((objects != NULL) && (count <= capacity));
- if((objectsPtr == NULL) && (NSMaxRange(range) > 0UL)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: pointer to objects array is NULL but range length is %lu", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)NSMaxRange(range)]; }
- if((range.location > count) || (NSMaxRange(range) > count)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)NSMaxRange(range), (unsigned long)count]; }
-#ifndef __clang_analyzer__
- memcpy(objectsPtr, objects + range.location, range.length * sizeof(id));
-#endif
-}
-
-- (id)objectAtIndex:(NSUInteger)objectIndex
-{
- if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)objectIndex, (unsigned long)count]; }
- NSParameterAssert((objects != NULL) && (count <= capacity) && (objects[objectIndex] != NULL));
- return(objects[objectIndex]);
-}
-
-- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len
-{
- NSParameterAssert((state != NULL) && (stackbuf != NULL) && (len > 0UL) && (objects != NULL) && (count <= capacity));
- if(JK_EXPECT_F(state->state == 0UL)) { state->mutationsPtr = (unsigned long *)&mutations; state->itemsPtr = stackbuf; }
- if(JK_EXPECT_F(state->state >= count)) { return(0UL); }
-
- NSUInteger enumeratedCount = 0UL;
- while(JK_EXPECT_T(enumeratedCount < len) && JK_EXPECT_T(state->state < count)) { NSParameterAssert(objects[state->state] != NULL); stackbuf[enumeratedCount++] = objects[state->state++]; }
-
- return(enumeratedCount);
-}
-
-- (void)insertObject:(id)anObject atIndex:(NSUInteger)objectIndex
-{
- if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(anObject == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(objectIndex > count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)objectIndex, (unsigned long)(count + 1UL)]; }
-#ifdef __clang_analyzer__
- [anObject retain]; // Stupid clang analyzer... Issue #19.
-#else
- anObject = [anObject retain];
-#endif
- _JKArrayInsertObjectAtIndex(self, anObject, objectIndex);
- mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
-}
-
-- (void)removeObjectAtIndex:(NSUInteger)objectIndex
-{
- if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)objectIndex, (unsigned long)count]; }
- _JKArrayRemoveObjectAtIndex(self, objectIndex);
- mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
-}
-
-- (void)replaceObjectAtIndex:(NSUInteger)objectIndex withObject:(id)anObject
-{
- if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(anObject == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)objectIndex, (unsigned long)count]; }
-#ifdef __clang_analyzer__
- [anObject retain]; // Stupid clang analyzer... Issue #19.
-#else
- anObject = [anObject retain];
-#endif
- _JKArrayReplaceObjectAtIndexWithObject(self, objectIndex, anObject);
- mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
-}
-
-- (id)copyWithZone:(NSZone *)zone
-{
- NSParameterAssert((objects != NULL) && (count <= capacity));
- return((mutations == 0UL) ? [self retain] : [(NSArray *)[NSArray allocWithZone:zone] initWithObjects:objects count:count]);
-}
-
-- (id)mutableCopyWithZone:(NSZone *)zone
-{
- NSParameterAssert((objects != NULL) && (count <= capacity));
- return([(NSMutableArray *)[NSMutableArray allocWithZone:zone] initWithObjects:objects count:count]);
-}
-
-@end
-
-
-#pragma mark -
-@interface JKDictionaryEnumerator : NSEnumerator {
- id collection;
- NSUInteger nextObject;
-}
-
-- (id)initWithJKDictionary:(JKDictionary *)initDictionary;
-- (NSArray *)allObjects;
-- (id)nextObject;
-
-@end
-
-@implementation JKDictionaryEnumerator
-
-- (id)initWithJKDictionary:(JKDictionary *)initDictionary
-{
- NSParameterAssert(initDictionary != NULL);
- if((self = [super init]) == NULL) { return(NULL); }
- if((collection = (id)CFRetain(initDictionary)) == NULL) { [self autorelease]; return(NULL); }
- return(self);
-}
-
-- (void)dealloc
-{
- if(collection != NULL) { CFRelease(collection); collection = NULL; }
- [super dealloc];
-}
-
-- (NSArray *)allObjects
-{
- NSParameterAssert(collection != NULL);
- NSUInteger count = [(NSDictionary *)collection count], atObject = 0UL;
- id objects[count];
-
- while((objects[atObject] = [self nextObject]) != NULL) { NSParameterAssert(atObject < count); atObject++; }
-
- return([NSArray arrayWithObjects:objects count:atObject]);
-}
-
-- (id)nextObject
-{
- NSParameterAssert((collection != NULL) && (_JKDictionaryHashEntry(collection) != NULL));
- JKHashTableEntry *entry = _JKDictionaryHashEntry(collection);
- NSUInteger capacity = _JKDictionaryCapacity(collection);
- id returnObject = NULL;
-
- if(entry != NULL) { while((nextObject < capacity) && ((returnObject = entry[nextObject++].key) == NULL)) { /* ... */ } }
-
- return(returnObject);
-}
-
-@end
-
-#pragma mark -
-@interface JKDictionary : NSMutableDictionary {
- NSUInteger count, capacity, mutations;
- JKHashTableEntry *entry;
-}
-@end
-
-@implementation JKDictionary
-
-+ (id)allocWithZone:(NSZone *)zone
-{
-#pragma unused(zone)
- [NSException raise:NSInvalidArgumentException format:@"*** - [%@ %@]: The %@ class is private to JSONKit and should not be used in this fashion.", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSStringFromClass([self class])];
- return(NULL);
-}
-
-// These values are taken from Core Foundation CF-550 CFBasicHash.m. As a bonus, they align very well with our JKHashTableEntry struct too.
-static const NSUInteger jk_dictionaryCapacities[] = {
- 0UL, 3UL, 7UL, 13UL, 23UL, 41UL, 71UL, 127UL, 191UL, 251UL, 383UL, 631UL, 1087UL, 1723UL,
- 2803UL, 4523UL, 7351UL, 11959UL, 19447UL, 31231UL, 50683UL, 81919UL, 132607UL,
- 214519UL, 346607UL, 561109UL, 907759UL, 1468927UL, 2376191UL, 3845119UL,
- 6221311UL, 10066421UL, 16287743UL, 26354171UL, 42641881UL, 68996069UL,
- 111638519UL, 180634607UL, 292272623UL, 472907251UL
-};
-
-static NSUInteger _JKDictionaryCapacityForCount(NSUInteger count) {
- NSUInteger bottom = 0UL, top = sizeof(jk_dictionaryCapacities) / sizeof(NSUInteger), mid = 0UL, tableSize = (NSUInteger)lround(floor(((double)count) * 1.33));
- while(top > bottom) { mid = (top + bottom) / 2UL; if(jk_dictionaryCapacities[mid] < tableSize) { bottom = mid + 1UL; } else { top = mid; } }
- return(jk_dictionaryCapacities[bottom]);
-}
-
-static void _JKDictionaryResizeIfNeccessary(JKDictionary *dictionary) {
- NSCParameterAssert((dictionary != NULL) && (dictionary->entry != NULL) && (dictionary->count <= dictionary->capacity));
-
- NSUInteger capacityForCount = 0UL;
- if(dictionary->capacity < (capacityForCount = _JKDictionaryCapacityForCount(dictionary->count + 1UL))) { // resize
- NSUInteger oldCapacity = dictionary->capacity;
-#ifndef NS_BLOCK_ASSERTIONS
- NSUInteger oldCount = dictionary->count;
-#endif
- JKHashTableEntry *oldEntry = dictionary->entry;
- if(JK_EXPECT_F((dictionary->entry = (JKHashTableEntry *)calloc(1UL, sizeof(JKHashTableEntry) * capacityForCount)) == NULL)) { [NSException raise:NSMallocException format:@"Unable to allocate memory for hash table."]; }
- dictionary->capacity = capacityForCount;
- dictionary->count = 0UL;
-
- NSUInteger idx = 0UL;
- for(idx = 0UL; idx < oldCapacity; idx++) { if(oldEntry[idx].key != NULL) { _JKDictionaryAddObject(dictionary, oldEntry[idx].keyHash, oldEntry[idx].key, oldEntry[idx].object); oldEntry[idx].keyHash = 0UL; oldEntry[idx].key = NULL; oldEntry[idx].object = NULL; } }
- NSCParameterAssert((oldCount == dictionary->count));
- free(oldEntry); oldEntry = NULL;
- }
-}
-
-static JKDictionary *_JKDictionaryCreate(id *keys, NSUInteger *keyHashes, id *objects, NSUInteger count, BOOL mutableCollection) {
- NSCParameterAssert((keys != NULL) && (keyHashes != NULL) && (objects != NULL) && (_JKDictionaryClass != NULL) && (_JKDictionaryInstanceSize > 0UL));
- JKDictionary *dictionary = NULL;
- if(JK_EXPECT_T((dictionary = (JKDictionary *)calloc(1UL, _JKDictionaryInstanceSize)) != NULL)) { // Directly allocate the JKDictionary instance via calloc.
- object_setClass(dictionary, _JKDictionaryClass);
- if((dictionary = [dictionary init]) == NULL) { return(NULL); }
- dictionary->capacity = _JKDictionaryCapacityForCount(count);
- dictionary->count = 0UL;
-
- if(JK_EXPECT_F((dictionary->entry = (JKHashTableEntry *)calloc(1UL, sizeof(JKHashTableEntry) * dictionary->capacity)) == NULL)) { [dictionary autorelease]; return(NULL); }
-
- NSUInteger idx = 0UL;
- for(idx = 0UL; idx < count; idx++) { _JKDictionaryAddObject(dictionary, keyHashes[idx], keys[idx], objects[idx]); }
-
- dictionary->mutations = (mutableCollection == NO) ? 0UL : 1UL;
- }
- return(dictionary);
-}
-
-- (void)dealloc
-{
- if(JK_EXPECT_T(entry != NULL)) {
- NSUInteger atEntry = 0UL;
- for(atEntry = 0UL; atEntry < capacity; atEntry++) {
- if(JK_EXPECT_T(entry[atEntry].key != NULL)) { CFRelease(entry[atEntry].key); entry[atEntry].key = NULL; }
- if(JK_EXPECT_T(entry[atEntry].object != NULL)) { CFRelease(entry[atEntry].object); entry[atEntry].object = NULL; }
- }
-
- free(entry); entry = NULL;
- }
-
- [super dealloc];
-}
-
-static JKHashTableEntry *_JKDictionaryHashEntry(JKDictionary *dictionary) {
- NSCParameterAssert(dictionary != NULL);
- return(dictionary->entry);
-}
-
-static NSUInteger _JKDictionaryCapacity(JKDictionary *dictionary) {
- NSCParameterAssert(dictionary != NULL);
- return(dictionary->capacity);
-}
-
-static void _JKDictionaryRemoveObjectWithEntry(JKDictionary *dictionary, JKHashTableEntry *entry) {
- NSCParameterAssert((dictionary != NULL) && (entry != NULL) && (entry->key != NULL) && (entry->object != NULL) && (dictionary->count > 0UL) && (dictionary->count <= dictionary->capacity));
- CFRelease(entry->key); entry->key = NULL;
- CFRelease(entry->object); entry->object = NULL;
- entry->keyHash = 0UL;
- dictionary->count--;
- // In order for certain invariants that are used to speed up the search for a particular key, we need to "re-add" all the entries in the hash table following this entry until we hit a NULL entry.
- NSUInteger removeIdx = entry - dictionary->entry, idx = 0UL;
- NSCParameterAssert((removeIdx < dictionary->capacity));
- for(idx = 0UL; idx < dictionary->capacity; idx++) {
- NSUInteger entryIdx = (removeIdx + idx + 1UL) % dictionary->capacity;
- JKHashTableEntry *atEntry = &dictionary->entry[entryIdx];
- if(atEntry->key == NULL) { break; }
- NSUInteger keyHash = atEntry->keyHash;
- id key = atEntry->key, object = atEntry->object;
- NSCParameterAssert(object != NULL);
- atEntry->keyHash = 0UL;
- atEntry->key = NULL;
- atEntry->object = NULL;
- NSUInteger addKeyEntry = keyHash % dictionary->capacity, addIdx = 0UL;
- for(addIdx = 0UL; addIdx < dictionary->capacity; addIdx++) {
- JKHashTableEntry *atAddEntry = &dictionary->entry[((addKeyEntry + addIdx) % dictionary->capacity)];
- if(JK_EXPECT_T(atAddEntry->key == NULL)) { NSCParameterAssert((atAddEntry->keyHash == 0UL) && (atAddEntry->object == NULL)); atAddEntry->key = key; atAddEntry->object = object; atAddEntry->keyHash = keyHash; break; }
- }
- }
-}
-
-static void _JKDictionaryAddObject(JKDictionary *dictionary, NSUInteger keyHash, id key, id object) {
- NSCParameterAssert((dictionary != NULL) && (key != NULL) && (object != NULL) && (dictionary->count < dictionary->capacity) && (dictionary->entry != NULL));
- NSUInteger keyEntry = keyHash % dictionary->capacity, idx = 0UL;
- for(idx = 0UL; idx < dictionary->capacity; idx++) {
- NSUInteger entryIdx = (keyEntry + idx) % dictionary->capacity;
- JKHashTableEntry *atEntry = &dictionary->entry[entryIdx];
- if(JK_EXPECT_F(atEntry->keyHash == keyHash) && JK_EXPECT_T(atEntry->key != NULL) && (JK_EXPECT_F(key == atEntry->key) || JK_EXPECT_F(CFEqual(atEntry->key, key)))) { _JKDictionaryRemoveObjectWithEntry(dictionary, atEntry); }
- if(JK_EXPECT_T(atEntry->key == NULL)) { NSCParameterAssert((atEntry->keyHash == 0UL) && (atEntry->object == NULL)); atEntry->key = key; atEntry->object = object; atEntry->keyHash = keyHash; dictionary->count++; return; }
- }
-
- // We should never get here. If we do, we -release the key / object because it's our responsibility.
- CFRelease(key);
- CFRelease(object);
-}
-
-- (NSUInteger)count
-{
- return(count);
-}
-
-static JKHashTableEntry *_JKDictionaryHashTableEntryForKey(JKDictionary *dictionary, id aKey) {
- NSCParameterAssert((dictionary != NULL) && (dictionary->entry != NULL) && (dictionary->count <= dictionary->capacity));
- if((aKey == NULL) || (dictionary->capacity == 0UL)) { return(NULL); }
- NSUInteger keyHash = CFHash(aKey), keyEntry = (keyHash % dictionary->capacity), idx = 0UL;
- JKHashTableEntry *atEntry = NULL;
- for(idx = 0UL; idx < dictionary->capacity; idx++) {
- atEntry = &dictionary->entry[(keyEntry + idx) % dictionary->capacity];
- if(JK_EXPECT_T(atEntry->keyHash == keyHash) && JK_EXPECT_T(atEntry->key != NULL) && ((atEntry->key == aKey) || CFEqual(atEntry->key, aKey))) { NSCParameterAssert(atEntry->object != NULL); return(atEntry); break; }
- if(JK_EXPECT_F(atEntry->key == NULL)) { NSCParameterAssert(atEntry->object == NULL); return(NULL); break; } // If the key was in the table, we would have found it by now.
- }
- return(NULL);
-}
-
-- (id)objectForKey:(id)aKey
-{
- NSParameterAssert((entry != NULL) && (count <= capacity));
- JKHashTableEntry *entryForKey = _JKDictionaryHashTableEntryForKey(self, aKey);
- return((entryForKey != NULL) ? entryForKey->object : NULL);
-}
-
-- (void)getObjects:(id *)objects andKeys:(id *)keys
-{
- NSParameterAssert((entry != NULL) && (count <= capacity));
- NSUInteger atEntry = 0UL; NSUInteger arrayIdx = 0UL;
- for(atEntry = 0UL; atEntry < capacity; atEntry++) {
- if(JK_EXPECT_T(entry[atEntry].key != NULL)) {
- NSCParameterAssert((entry[atEntry].object != NULL) && (arrayIdx < count));
- if(JK_EXPECT_T(keys != NULL)) { keys[arrayIdx] = entry[atEntry].key; }
- if(JK_EXPECT_T(objects != NULL)) { objects[arrayIdx] = entry[atEntry].object; }
- arrayIdx++;
- }
- }
-}
-
-- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len
-{
- NSParameterAssert((state != NULL) && (stackbuf != NULL) && (len > 0UL) && (entry != NULL) && (count <= capacity));
- if(JK_EXPECT_F(state->state == 0UL)) { state->mutationsPtr = (unsigned long *)&mutations; state->itemsPtr = stackbuf; }
- if(JK_EXPECT_F(state->state >= capacity)) { return(0UL); }
-
- NSUInteger enumeratedCount = 0UL;
- while(JK_EXPECT_T(enumeratedCount < len) && JK_EXPECT_T(state->state < capacity)) { if(JK_EXPECT_T(entry[state->state].key != NULL)) { stackbuf[enumeratedCount++] = entry[state->state].key; } state->state++; }
-
- return(enumeratedCount);
-}
-
-- (NSEnumerator *)keyEnumerator
-{
- return([[[JKDictionaryEnumerator alloc] initWithJKDictionary:self] autorelease]);
-}
-
-- (void)setObject:(id)anObject forKey:(id)aKey
-{
- if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(aKey == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil key", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(anObject == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil value (key: %@)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), aKey]; }
-
- _JKDictionaryResizeIfNeccessary(self);
-#ifndef __clang_analyzer__
- aKey = [aKey copy]; // Why on earth would clang complain that this -copy "might leak",
- anObject = [anObject retain]; // but this -retain doesn't!?
-#endif // __clang_analyzer__
- _JKDictionaryAddObject(self, CFHash(aKey), aKey, anObject);
- mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
-}
-
-- (void)removeObjectForKey:(id)aKey
-{
- if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- if(aKey == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to remove nil key", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }
- JKHashTableEntry *entryForKey = _JKDictionaryHashTableEntryForKey(self, aKey);
- if(entryForKey != NULL) {
- _JKDictionaryRemoveObjectWithEntry(self, entryForKey);
- mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
- }
-}
-
-- (id)copyWithZone:(NSZone *)zone
-{
- NSParameterAssert((entry != NULL) && (count <= capacity));
- return((mutations == 0UL) ? [self retain] : [[NSDictionary allocWithZone:zone] initWithDictionary:self]);
-}
-
-- (id)mutableCopyWithZone:(NSZone *)zone
-{
- NSParameterAssert((entry != NULL) && (count <= capacity));
- return([[NSMutableDictionary allocWithZone:zone] initWithDictionary:self]);
-}
-
-@end
-
-
-
-#pragma mark -
-
-JK_STATIC_INLINE size_t jk_min(size_t a, size_t b) { return((a < b) ? a : b); }
-JK_STATIC_INLINE size_t jk_max(size_t a, size_t b) { return((a > b) ? a : b); }
-
-JK_STATIC_INLINE JKHash jk_calculateHash(JKHash currentHash, unsigned char c) { return((((currentHash << 5) + currentHash) + (c - 29)) ^ (currentHash >> 19)); }
-
-
-static void jk_error(JKParseState *parseState, NSString *format, ...) {
- NSCParameterAssert((parseState != NULL) && (format != NULL));
-
- va_list varArgsList;
- va_start(varArgsList, format);
- NSString *formatString = [[[NSString alloc] initWithFormat:format arguments:varArgsList] autorelease];
- va_end(varArgsList);
-
-#if 0
- const unsigned char *lineStart = parseState->stringBuffer.bytes.ptr + parseState->lineStartIndex;
- const unsigned char *lineEnd = lineStart;
- const unsigned char *atCharacterPtr = NULL;
-
- for(atCharacterPtr = lineStart; atCharacterPtr < JK_END_STRING_PTR(parseState); atCharacterPtr++) { lineEnd = atCharacterPtr; if(jk_parse_is_newline(parseState, atCharacterPtr)) { break; } }
-
- NSString *lineString = @"", *carretString = @"";
- if(lineStart < JK_END_STRING_PTR(parseState)) {
- lineString = [[[NSString alloc] initWithBytes:lineStart length:(lineEnd - lineStart) encoding:NSUTF8StringEncoding] autorelease];
- carretString = [NSString stringWithFormat:@"%*.*s^", (int)(parseState->atIndex - parseState->lineStartIndex), (int)(parseState->atIndex - parseState->lineStartIndex), " "];
- }
-#endif
-
- if(parseState->error == NULL) {
- parseState->error = [NSError errorWithDomain:@"JKErrorDomain" code:-1L userInfo:
- [NSDictionary dictionaryWithObjectsAndKeys:
- formatString, NSLocalizedDescriptionKey,
- [NSNumber numberWithUnsignedLong:parseState->atIndex], @"JKAtIndexKey",
- [NSNumber numberWithUnsignedLong:parseState->lineNumber], @"JKLineNumberKey",
- //lineString, @"JKErrorLine0Key",
- //carretString, @"JKErrorLine1Key",
- NULL]];
- }
-}
-
-#pragma mark -
-#pragma mark Buffer and Object Stack management functions
-
-static void jk_managedBuffer_release(JKManagedBuffer *managedBuffer) {
- if((managedBuffer->flags & JKManagedBufferMustFree)) {
- if(managedBuffer->bytes.ptr != NULL) { free(managedBuffer->bytes.ptr); managedBuffer->bytes.ptr = NULL; }
- managedBuffer->flags &= ~JKManagedBufferMustFree;
- }
-
- managedBuffer->bytes.ptr = NULL;
- managedBuffer->bytes.length = 0UL;
- managedBuffer->flags &= ~JKManagedBufferLocationMask;
-}
-
-static void jk_managedBuffer_setToStackBuffer(JKManagedBuffer *managedBuffer, unsigned char *ptr, size_t length) {
- jk_managedBuffer_release(managedBuffer);
- managedBuffer->bytes.ptr = ptr;
- managedBuffer->bytes.length = length;
- managedBuffer->flags = (managedBuffer->flags & ~JKManagedBufferLocationMask) | JKManagedBufferOnStack;
-}
-
-static unsigned char *jk_managedBuffer_resize(JKManagedBuffer *managedBuffer, size_t newSize) {
- size_t roundedUpNewSize = newSize;
-
- if(managedBuffer->roundSizeUpToMultipleOf > 0UL) { roundedUpNewSize = newSize + ((managedBuffer->roundSizeUpToMultipleOf - (newSize % managedBuffer->roundSizeUpToMultipleOf)) % managedBuffer->roundSizeUpToMultipleOf); }
-
- if((roundedUpNewSize != managedBuffer->bytes.length) && (roundedUpNewSize > managedBuffer->bytes.length)) {
- if((managedBuffer->flags & JKManagedBufferLocationMask) == JKManagedBufferOnStack) {
- NSCParameterAssert((managedBuffer->flags & JKManagedBufferMustFree) == 0);
- unsigned char *newBuffer = NULL, *oldBuffer = managedBuffer->bytes.ptr;
-
- if((newBuffer = (unsigned char *)malloc(roundedUpNewSize)) == NULL) { return(NULL); }
- memcpy(newBuffer, oldBuffer, jk_min(managedBuffer->bytes.length, roundedUpNewSize));
- managedBuffer->flags = (managedBuffer->flags & ~JKManagedBufferLocationMask) | (JKManagedBufferOnHeap | JKManagedBufferMustFree);
- managedBuffer->bytes.ptr = newBuffer;
- managedBuffer->bytes.length = roundedUpNewSize;
- } else {
- NSCParameterAssert(((managedBuffer->flags & JKManagedBufferMustFree) != 0) && ((managedBuffer->flags & JKManagedBufferLocationMask) == JKManagedBufferOnHeap));
- if((managedBuffer->bytes.ptr = (unsigned char *)reallocf(managedBuffer->bytes.ptr, roundedUpNewSize)) == NULL) { return(NULL); }
- managedBuffer->bytes.length = roundedUpNewSize;
- }
- }
-
- return(managedBuffer->bytes.ptr);
-}
-
-
-
-static void jk_objectStack_release(JKObjectStack *objectStack) {
- NSCParameterAssert(objectStack != NULL);
-
- NSCParameterAssert(objectStack->index <= objectStack->count);
- size_t atIndex = 0UL;
- for(atIndex = 0UL; atIndex < objectStack->index; atIndex++) {
- if(objectStack->objects[atIndex] != NULL) { CFRelease(objectStack->objects[atIndex]); objectStack->objects[atIndex] = NULL; }
- if(objectStack->keys[atIndex] != NULL) { CFRelease(objectStack->keys[atIndex]); objectStack->keys[atIndex] = NULL; }
- }
- objectStack->index = 0UL;
-
- if(objectStack->flags & JKObjectStackMustFree) {
- NSCParameterAssert((objectStack->flags & JKObjectStackLocationMask) == JKObjectStackOnHeap);
- if(objectStack->objects != NULL) { free(objectStack->objects); objectStack->objects = NULL; }
- if(objectStack->keys != NULL) { free(objectStack->keys); objectStack->keys = NULL; }
- if(objectStack->cfHashes != NULL) { free(objectStack->cfHashes); objectStack->cfHashes = NULL; }
- objectStack->flags &= ~JKObjectStackMustFree;
- }
-
- objectStack->objects = NULL;
- objectStack->keys = NULL;
- objectStack->cfHashes = NULL;
-
- objectStack->count = 0UL;
- objectStack->flags &= ~JKObjectStackLocationMask;
-}
-
-static void jk_objectStack_setToStackBuffer(JKObjectStack *objectStack, void **objects, void **keys, CFHashCode *cfHashes, size_t count) {
- NSCParameterAssert((objectStack != NULL) && (objects != NULL) && (keys != NULL) && (cfHashes != NULL) && (count > 0UL));
- jk_objectStack_release(objectStack);
- objectStack->objects = objects;
- objectStack->keys = keys;
- objectStack->cfHashes = cfHashes;
- objectStack->count = count;
- objectStack->flags = (objectStack->flags & ~JKObjectStackLocationMask) | JKObjectStackOnStack;
-#ifndef NS_BLOCK_ASSERTIONS
- size_t idx;
- for(idx = 0UL; idx < objectStack->count; idx++) { objectStack->objects[idx] = NULL; objectStack->keys[idx] = NULL; objectStack->cfHashes[idx] = 0UL; }
-#endif
-}
-
-static int jk_objectStack_resize(JKObjectStack *objectStack, size_t newCount) {
- size_t roundedUpNewCount = newCount;
- int returnCode = 0;
-
- void **newObjects = NULL, **newKeys = NULL;
- CFHashCode *newCFHashes = NULL;
-
- if(objectStack->roundSizeUpToMultipleOf > 0UL) { roundedUpNewCount = newCount + ((objectStack->roundSizeUpToMultipleOf - (newCount % objectStack->roundSizeUpToMultipleOf)) % objectStack->roundSizeUpToMultipleOf); }
-
- if((roundedUpNewCount != objectStack->count) && (roundedUpNewCount > objectStack->count)) {
- if((objectStack->flags & JKObjectStackLocationMask) == JKObjectStackOnStack) {
- NSCParameterAssert((objectStack->flags & JKObjectStackMustFree) == 0);
-
- if((newObjects = (void ** )calloc(1UL, roundedUpNewCount * sizeof(void * ))) == NULL) { returnCode = 1; goto errorExit; }
- memcpy(newObjects, objectStack->objects, jk_min(objectStack->count, roundedUpNewCount) * sizeof(void *));
- if((newKeys = (void ** )calloc(1UL, roundedUpNewCount * sizeof(void * ))) == NULL) { returnCode = 1; goto errorExit; }
- memcpy(newKeys, objectStack->keys, jk_min(objectStack->count, roundedUpNewCount) * sizeof(void *));
-
- if((newCFHashes = (CFHashCode *)calloc(1UL, roundedUpNewCount * sizeof(CFHashCode))) == NULL) { returnCode = 1; goto errorExit; }
- memcpy(newCFHashes, objectStack->cfHashes, jk_min(objectStack->count, roundedUpNewCount) * sizeof(CFHashCode));
-
- objectStack->flags = (objectStack->flags & ~JKObjectStackLocationMask) | (JKObjectStackOnHeap | JKObjectStackMustFree);
- objectStack->objects = newObjects; newObjects = NULL;
- objectStack->keys = newKeys; newKeys = NULL;
- objectStack->cfHashes = newCFHashes; newCFHashes = NULL;
- objectStack->count = roundedUpNewCount;
- } else {
- NSCParameterAssert(((objectStack->flags & JKObjectStackMustFree) != 0) && ((objectStack->flags & JKObjectStackLocationMask) == JKObjectStackOnHeap));
- if((newObjects = (void ** )realloc(objectStack->objects, roundedUpNewCount * sizeof(void * ))) != NULL) { objectStack->objects = newObjects; newObjects = NULL; } else { returnCode = 1; goto errorExit; }
- if((newKeys = (void ** )realloc(objectStack->keys, roundedUpNewCount * sizeof(void * ))) != NULL) { objectStack->keys = newKeys; newKeys = NULL; } else { returnCode = 1; goto errorExit; }
- if((newCFHashes = (CFHashCode *)realloc(objectStack->cfHashes, roundedUpNewCount * sizeof(CFHashCode))) != NULL) { objectStack->cfHashes = newCFHashes; newCFHashes = NULL; } else { returnCode = 1; goto errorExit; }
-
-#ifndef NS_BLOCK_ASSERTIONS
- size_t idx;
- for(idx = objectStack->count; idx < roundedUpNewCount; idx++) { objectStack->objects[idx] = NULL; objectStack->keys[idx] = NULL; objectStack->cfHashes[idx] = 0UL; }
-#endif
- objectStack->count = roundedUpNewCount;
- }
- }
-
- errorExit:
- if(newObjects != NULL) { free(newObjects); newObjects = NULL; }
- if(newKeys != NULL) { free(newKeys); newKeys = NULL; }
- if(newCFHashes != NULL) { free(newCFHashes); newCFHashes = NULL; }
-
- return(returnCode);
-}
-
-////////////
-#pragma mark -
-#pragma mark Unicode related functions
-
-JK_STATIC_INLINE ConversionResult isValidCodePoint(UTF32 *u32CodePoint) {
- ConversionResult result = conversionOK;
- UTF32 ch = *u32CodePoint;
-
- if(JK_EXPECT_F(ch >= UNI_SUR_HIGH_START) && (JK_EXPECT_T(ch <= UNI_SUR_LOW_END))) { result = sourceIllegal; ch = UNI_REPLACEMENT_CHAR; goto finished; }
- if(JK_EXPECT_F(ch >= 0xFDD0U) && (JK_EXPECT_F(ch <= 0xFDEFU) || JK_EXPECT_F((ch & 0xFFFEU) == 0xFFFEU)) && JK_EXPECT_T(ch <= 0x10FFFFU)) { result = sourceIllegal; ch = UNI_REPLACEMENT_CHAR; goto finished; }
- if(JK_EXPECT_F(ch == 0U)) { result = sourceIllegal; ch = UNI_REPLACEMENT_CHAR; goto finished; }
-
- finished:
- *u32CodePoint = ch;
- return(result);
-}
-
-
-static int isLegalUTF8(const UTF8 *source, size_t length) {
- const UTF8 *srcptr = source + length;
- UTF8 a;
-
- switch(length) {
- default: return(0); // Everything else falls through when "true"...
- case 4: if(JK_EXPECT_F(((a = (*--srcptr)) < 0x80) || (a > 0xBF))) { return(0); }
- case 3: if(JK_EXPECT_F(((a = (*--srcptr)) < 0x80) || (a > 0xBF))) { return(0); }
- case 2: if(JK_EXPECT_F( (a = (*--srcptr)) > 0xBF )) { return(0); }
-
- switch(*source) { // no fall-through in this inner switch
- case 0xE0: if(JK_EXPECT_F(a < 0xA0)) { return(0); } break;
- case 0xED: if(JK_EXPECT_F(a > 0x9F)) { return(0); } break;
- case 0xF0: if(JK_EXPECT_F(a < 0x90)) { return(0); } break;
- case 0xF4: if(JK_EXPECT_F(a > 0x8F)) { return(0); } break;
- default: if(JK_EXPECT_F(a < 0x80)) { return(0); }
- }
-
- case 1: if(JK_EXPECT_F((JK_EXPECT_T(*source < 0xC2)) && JK_EXPECT_F(*source >= 0x80))) { return(0); }
- }
-
- if(JK_EXPECT_F(*source > 0xF4)) { return(0); }
-
- return(1);
-}
-
-static ConversionResult ConvertSingleCodePointInUTF8(const UTF8 *sourceStart, const UTF8 *sourceEnd, UTF8 const **nextUTF8, UTF32 *convertedUTF32) {
- ConversionResult result = conversionOK;
- const UTF8 *source = sourceStart;
- UTF32 ch = 0UL;
-
-#if !defined(JK_FAST_TRAILING_BYTES)
- unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
-#else
- unsigned short extraBytesToRead = __builtin_clz(((*source)^0xff) << 25);
-#endif
-
- if(JK_EXPECT_F((source + extraBytesToRead + 1) > sourceEnd) || JK_EXPECT_F(!isLegalUTF8(source, extraBytesToRead + 1))) {
- source++;
- while((source < sourceEnd) && (((*source) & 0xc0) == 0x80) && ((source - sourceStart) < (extraBytesToRead + 1))) { source++; }
- NSCParameterAssert(source <= sourceEnd);
- result = ((source < sourceEnd) && (((*source) & 0xc0) != 0x80)) ? sourceIllegal : ((sourceStart + extraBytesToRead + 1) > sourceEnd) ? sourceExhausted : sourceIllegal;
- ch = UNI_REPLACEMENT_CHAR;
- goto finished;
- }
-
- switch(extraBytesToRead) { // The cases all fall through.
- case 5: ch += *source++; ch <<= 6;
- case 4: ch += *source++; ch <<= 6;
- case 3: ch += *source++; ch <<= 6;
- case 2: ch += *source++; ch <<= 6;
- case 1: ch += *source++; ch <<= 6;
- case 0: ch += *source++;
- }
- ch -= offsetsFromUTF8[extraBytesToRead];
-
- result = isValidCodePoint(&ch);
-
- finished:
- *nextUTF8 = source;
- *convertedUTF32 = ch;
-
- return(result);
-}
-
-
-static ConversionResult ConvertUTF32toUTF8 (UTF32 u32CodePoint, UTF8 **targetStart, UTF8 *targetEnd) {
- const UTF32 byteMask = 0xBF, byteMark = 0x80;
- ConversionResult result = conversionOK;
- UTF8 *target = *targetStart;
- UTF32 ch = u32CodePoint;
- unsigned short bytesToWrite = 0;
-
- result = isValidCodePoint(&ch);
-
- // Figure out how many bytes the result will require. Turn any illegally large UTF32 things (> Plane 17) into replacement chars.
- if(ch < (UTF32)0x80) { bytesToWrite = 1; }
- else if(ch < (UTF32)0x800) { bytesToWrite = 2; }
- else if(ch < (UTF32)0x10000) { bytesToWrite = 3; }
- else if(ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; }
- else { bytesToWrite = 3; ch = UNI_REPLACEMENT_CHAR; result = sourceIllegal; }
-
- target += bytesToWrite;
- if (target > targetEnd) { target -= bytesToWrite; result = targetExhausted; goto finished; }
-
- switch (bytesToWrite) { // note: everything falls through.
- case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]);
- }
-
- target += bytesToWrite;
-
- finished:
- *targetStart = target;
- return(result);
-}
-
-JK_STATIC_INLINE int jk_string_add_unicodeCodePoint(JKParseState *parseState, uint32_t unicodeCodePoint, size_t *tokenBufferIdx, JKHash *stringHash) {
- UTF8 *u8s = &parseState->token.tokenBuffer.bytes.ptr[*tokenBufferIdx];
- ConversionResult result;
-
- if((result = ConvertUTF32toUTF8(unicodeCodePoint, &u8s, (parseState->token.tokenBuffer.bytes.ptr + parseState->token.tokenBuffer.bytes.length))) != conversionOK) { if(result == targetExhausted) { return(1); } }
- size_t utf8len = u8s - &parseState->token.tokenBuffer.bytes.ptr[*tokenBufferIdx], nextIdx = (*tokenBufferIdx) + utf8len;
-
- while(*tokenBufferIdx < nextIdx) { *stringHash = jk_calculateHash(*stringHash, parseState->token.tokenBuffer.bytes.ptr[(*tokenBufferIdx)++]); }
-
- return(0);
-}
-
-////////////
-#pragma mark -
-#pragma mark Decoding / parsing / deserializing functions
-
-static int jk_parse_string(JKParseState *parseState) {
- NSCParameterAssert((parseState != NULL) && (JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)));
- const unsigned char *stringStart = JK_AT_STRING_PTR(parseState) + 1;
- const unsigned char *endOfBuffer = JK_END_STRING_PTR(parseState);
- const unsigned char *atStringCharacter = stringStart;
- unsigned char *tokenBuffer = parseState->token.tokenBuffer.bytes.ptr;
- size_t tokenStartIndex = parseState->atIndex;
- size_t tokenBufferIdx = 0UL;
-
- int onlySimpleString = 1, stringState = JSONStringStateStart;
- uint16_t escapedUnicode1 = 0U, escapedUnicode2 = 0U;
- uint32_t escapedUnicodeCodePoint = 0U;
- JKHash stringHash = JK_HASH_INIT;
-
- while(1) {
- unsigned long currentChar;
-
- if(JK_EXPECT_F(atStringCharacter == endOfBuffer)) { /* XXX Add error message */ stringState = JSONStringStateError; goto finishedParsing; }
-
- if(JK_EXPECT_F((currentChar = *atStringCharacter++) >= 0x80UL)) {
- const unsigned char *nextValidCharacter = NULL;
- UTF32 u32ch = 0U;
- ConversionResult result;
-
- if(JK_EXPECT_F((result = ConvertSingleCodePointInUTF8(atStringCharacter - 1, endOfBuffer, (UTF8 const **)&nextValidCharacter, &u32ch)) != conversionOK)) { goto switchToSlowPath; }
- stringHash = jk_calculateHash(stringHash, currentChar);
- while(atStringCharacter < nextValidCharacter) { NSCParameterAssert(JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)); stringHash = jk_calculateHash(stringHash, *atStringCharacter++); }
- continue;
- } else {
- if(JK_EXPECT_F(currentChar == (unsigned long)'"')) { stringState = JSONStringStateFinished; goto finishedParsing; }
-
- if(JK_EXPECT_F(currentChar == (unsigned long)'\\')) {
- switchToSlowPath:
- onlySimpleString = 0;
- stringState = JSONStringStateParsing;
- tokenBufferIdx = (atStringCharacter - stringStart) - 1L;
- if(JK_EXPECT_F((tokenBufferIdx + 16UL) > parseState->token.tokenBuffer.bytes.length)) { if((tokenBuffer = jk_managedBuffer_resize(&parseState->token.tokenBuffer, tokenBufferIdx + 1024UL)) == NULL) { jk_error(parseState, @"Internal error: Unable to resize temporary buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; } }
- memcpy(tokenBuffer, stringStart, tokenBufferIdx);
- goto slowMatch;
- }
-
- if(JK_EXPECT_F(currentChar < 0x20UL)) { jk_error(parseState, @"Invalid character < 0x20 found in string: 0x%2.2x.", currentChar); stringState = JSONStringStateError; goto finishedParsing; }
-
- stringHash = jk_calculateHash(stringHash, currentChar);
- }
- }
-
- slowMatch:
-
- for(atStringCharacter = (stringStart + ((atStringCharacter - stringStart) - 1L)); (atStringCharacter < endOfBuffer) && (tokenBufferIdx < parseState->token.tokenBuffer.bytes.length); atStringCharacter++) {
- if((tokenBufferIdx + 16UL) > parseState->token.tokenBuffer.bytes.length) { if((tokenBuffer = jk_managedBuffer_resize(&parseState->token.tokenBuffer, tokenBufferIdx + 1024UL)) == NULL) { jk_error(parseState, @"Internal error: Unable to resize temporary buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; } }
-
- NSCParameterAssert(tokenBufferIdx < parseState->token.tokenBuffer.bytes.length);
-
- unsigned long currentChar = (*atStringCharacter), escapedChar;
-
- if(JK_EXPECT_T(stringState == JSONStringStateParsing)) {
- if(JK_EXPECT_T(currentChar >= 0x20UL)) {
- if(JK_EXPECT_T(currentChar < (unsigned long)0x80)) { // Not a UTF8 sequence
- if(JK_EXPECT_F(currentChar == (unsigned long)'"')) { stringState = JSONStringStateFinished; atStringCharacter++; goto finishedParsing; }
- if(JK_EXPECT_F(currentChar == (unsigned long)'\\')) { stringState = JSONStringStateEscape; continue; }
- stringHash = jk_calculateHash(stringHash, currentChar);
- tokenBuffer[tokenBufferIdx++] = currentChar;
- continue;
- } else { // UTF8 sequence
- const unsigned char *nextValidCharacter = NULL;
- UTF32 u32ch = 0U;
- ConversionResult result;
-
- if(JK_EXPECT_F((result = ConvertSingleCodePointInUTF8(atStringCharacter, endOfBuffer, (UTF8 const **)&nextValidCharacter, &u32ch)) != conversionOK)) {
- if((result == sourceIllegal) && ((parseState->parseOptionFlags & JKParseOptionLooseUnicode) == 0)) { jk_error(parseState, @"Illegal UTF8 sequence found in \"\" string."); stringState = JSONStringStateError; goto finishedParsing; }
- if(result == sourceExhausted) { jk_error(parseState, @"End of buffer reached while parsing UTF8 in \"\" string."); stringState = JSONStringStateError; goto finishedParsing; }
- if(jk_string_add_unicodeCodePoint(parseState, u32ch, &tokenBufferIdx, &stringHash)) { jk_error(parseState, @"Internal error: Unable to add UTF8 sequence to internal string buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; }
- atStringCharacter = nextValidCharacter - 1;
- continue;
- } else {
- while(atStringCharacter < nextValidCharacter) { tokenBuffer[tokenBufferIdx++] = *atStringCharacter; stringHash = jk_calculateHash(stringHash, *atStringCharacter++); }
- atStringCharacter--;
- continue;
- }
- }
- } else { // currentChar < 0x20
- jk_error(parseState, @"Invalid character < 0x20 found in string: 0x%2.2x.", currentChar); stringState = JSONStringStateError; goto finishedParsing;
- }
-
- } else { // stringState != JSONStringStateParsing
- int isSurrogate = 1;
-
- switch(stringState) {
- case JSONStringStateEscape:
- switch(currentChar) {
- case 'u': escapedUnicode1 = 0U; escapedUnicode2 = 0U; escapedUnicodeCodePoint = 0U; stringState = JSONStringStateEscapedUnicode1; break;
-
- case 'b': escapedChar = '\b'; goto parsedEscapedChar;
- case 'f': escapedChar = '\f'; goto parsedEscapedChar;
- case 'n': escapedChar = '\n'; goto parsedEscapedChar;
- case 'r': escapedChar = '\r'; goto parsedEscapedChar;
- case 't': escapedChar = '\t'; goto parsedEscapedChar;
- case '\\': escapedChar = '\\'; goto parsedEscapedChar;
- case '/': escapedChar = '/'; goto parsedEscapedChar;
- case '"': escapedChar = '"'; goto parsedEscapedChar;
-
- parsedEscapedChar:
- stringState = JSONStringStateParsing;
- stringHash = jk_calculateHash(stringHash, escapedChar);
- tokenBuffer[tokenBufferIdx++] = escapedChar;
- break;
-
- default: jk_error(parseState, @"Invalid escape sequence found in \"\" string."); stringState = JSONStringStateError; goto finishedParsing; break;
- }
- break;
-
- case JSONStringStateEscapedUnicode1:
- case JSONStringStateEscapedUnicode2:
- case JSONStringStateEscapedUnicode3:
- case JSONStringStateEscapedUnicode4: isSurrogate = 0;
- case JSONStringStateEscapedUnicodeSurrogate1:
- case JSONStringStateEscapedUnicodeSurrogate2:
- case JSONStringStateEscapedUnicodeSurrogate3:
- case JSONStringStateEscapedUnicodeSurrogate4:
- {
- uint16_t hexValue = 0U;
-
- switch(currentChar) {
- case '0' ... '9': hexValue = currentChar - '0'; goto parsedHex;
- case 'a' ... 'f': hexValue = (currentChar - 'a') + 10U; goto parsedHex;
- case 'A' ... 'F': hexValue = (currentChar - 'A') + 10U; goto parsedHex;
-
- parsedHex:
- if(!isSurrogate) { escapedUnicode1 = (escapedUnicode1 << 4) | hexValue; } else { escapedUnicode2 = (escapedUnicode2 << 4) | hexValue; }
-
- if(stringState == JSONStringStateEscapedUnicode4) {
- if(((escapedUnicode1 >= 0xD800U) && (escapedUnicode1 < 0xE000U))) {
- if((escapedUnicode1 >= 0xD800U) && (escapedUnicode1 < 0xDC00U)) { stringState = JSONStringStateEscapedNeedEscapeForSurrogate; }
- else if((escapedUnicode1 >= 0xDC00U) && (escapedUnicode1 < 0xE000U)) {
- if((parseState->parseOptionFlags & JKParseOptionLooseUnicode)) { escapedUnicodeCodePoint = UNI_REPLACEMENT_CHAR; }
- else { jk_error(parseState, @"Illegal \\u Unicode escape sequence."); stringState = JSONStringStateError; goto finishedParsing; }
- }
- }
- else { escapedUnicodeCodePoint = escapedUnicode1; }
- }
-
- if(stringState == JSONStringStateEscapedUnicodeSurrogate4) {
- if((escapedUnicode2 < 0xdc00) || (escapedUnicode2 > 0xdfff)) {
- if((parseState->parseOptionFlags & JKParseOptionLooseUnicode)) { escapedUnicodeCodePoint = UNI_REPLACEMENT_CHAR; }
- else { jk_error(parseState, @"Illegal \\u Unicode escape sequence."); stringState = JSONStringStateError; goto finishedParsing; }
- }
- else { escapedUnicodeCodePoint = ((escapedUnicode1 - 0xd800) * 0x400) + (escapedUnicode2 - 0xdc00) + 0x10000; }
- }
-
- if((stringState == JSONStringStateEscapedUnicode4) || (stringState == JSONStringStateEscapedUnicodeSurrogate4)) {
- if((isValidCodePoint(&escapedUnicodeCodePoint) == sourceIllegal) && ((parseState->parseOptionFlags & JKParseOptionLooseUnicode) == 0)) { jk_error(parseState, @"Illegal \\u Unicode escape sequence."); stringState = JSONStringStateError; goto finishedParsing; }
- stringState = JSONStringStateParsing;
- if(jk_string_add_unicodeCodePoint(parseState, escapedUnicodeCodePoint, &tokenBufferIdx, &stringHash)) { jk_error(parseState, @"Internal error: Unable to add UTF8 sequence to internal string buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; }
- }
- else if((stringState >= JSONStringStateEscapedUnicode1) && (stringState <= JSONStringStateEscapedUnicodeSurrogate4)) { stringState++; }
- break;
-
- default: jk_error(parseState, @"Unexpected character found in \\u Unicode escape sequence. Found '%c', expected [0-9a-fA-F].", currentChar); stringState = JSONStringStateError; goto finishedParsing; break;
- }
- }
- break;
-
- case JSONStringStateEscapedNeedEscapeForSurrogate:
- if(currentChar == '\\') { stringState = JSONStringStateEscapedNeedEscapedUForSurrogate; }
- else {
- if((parseState->parseOptionFlags & JKParseOptionLooseUnicode) == 0) { jk_error(parseState, @"Required a second \\u Unicode escape sequence following a surrogate \\u Unicode escape sequence."); stringState = JSONStringStateError; goto finishedParsing; }
- else { stringState = JSONStringStateParsing; atStringCharacter--; if(jk_string_add_unicodeCodePoint(parseState, UNI_REPLACEMENT_CHAR, &tokenBufferIdx, &stringHash)) { jk_error(parseState, @"Internal error: Unable to add UTF8 sequence to internal string buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; } }
- }
- break;
-
- case JSONStringStateEscapedNeedEscapedUForSurrogate:
- if(currentChar == 'u') { stringState = JSONStringStateEscapedUnicodeSurrogate1; }
- else {
- if((parseState->parseOptionFlags & JKParseOptionLooseUnicode) == 0) { jk_error(parseState, @"Required a second \\u Unicode escape sequence following a surrogate \\u Unicode escape sequence."); stringState = JSONStringStateError; goto finishedParsing; }
- else { stringState = JSONStringStateParsing; atStringCharacter -= 2; if(jk_string_add_unicodeCodePoint(parseState, UNI_REPLACEMENT_CHAR, &tokenBufferIdx, &stringHash)) { jk_error(parseState, @"Internal error: Unable to add UTF8 sequence to internal string buffer. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; } }
- }
- break;
-
- default: jk_error(parseState, @"Internal error: Unknown stringState. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); stringState = JSONStringStateError; goto finishedParsing; break;
- }
- }
- }
-
-finishedParsing:
-
- if(JK_EXPECT_T(stringState == JSONStringStateFinished)) {
- NSCParameterAssert((parseState->stringBuffer.bytes.ptr + tokenStartIndex) < atStringCharacter);
-
- parseState->token.tokenPtrRange.ptr = parseState->stringBuffer.bytes.ptr + tokenStartIndex;
- parseState->token.tokenPtrRange.length = (atStringCharacter - parseState->token.tokenPtrRange.ptr);
-
- if(JK_EXPECT_T(onlySimpleString)) {
- NSCParameterAssert(((parseState->token.tokenPtrRange.ptr + 1) < endOfBuffer) && (parseState->token.tokenPtrRange.length >= 2UL) && (((parseState->token.tokenPtrRange.ptr + 1) + (parseState->token.tokenPtrRange.length - 2)) < endOfBuffer));
- parseState->token.value.ptrRange.ptr = parseState->token.tokenPtrRange.ptr + 1;
- parseState->token.value.ptrRange.length = parseState->token.tokenPtrRange.length - 2UL;
- } else {
- parseState->token.value.ptrRange.ptr = parseState->token.tokenBuffer.bytes.ptr;
- parseState->token.value.ptrRange.length = tokenBufferIdx;
- }
-
- parseState->token.value.hash = stringHash;
- parseState->token.value.type = JKValueTypeString;
- parseState->atIndex = (atStringCharacter - parseState->stringBuffer.bytes.ptr);
- }
-
- if(JK_EXPECT_F(stringState != JSONStringStateFinished)) { jk_error(parseState, @"Invalid string."); }
- return(JK_EXPECT_T(stringState == JSONStringStateFinished) ? 0 : 1);
-}
-
-static int jk_parse_number(JKParseState *parseState) {
- NSCParameterAssert((parseState != NULL) && (JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)));
- const unsigned char *numberStart = JK_AT_STRING_PTR(parseState);
- const unsigned char *endOfBuffer = JK_END_STRING_PTR(parseState);
- const unsigned char *atNumberCharacter = NULL;
- int numberState = JSONNumberStateWholeNumberStart, isFloatingPoint = 0, isNegative = 0, backup = 0;
- size_t startingIndex = parseState->atIndex;
-
- for(atNumberCharacter = numberStart; (JK_EXPECT_T(atNumberCharacter < endOfBuffer)) && (JK_EXPECT_T(!(JK_EXPECT_F(numberState == JSONNumberStateFinished) || JK_EXPECT_F(numberState == JSONNumberStateError)))); atNumberCharacter++) {
- unsigned long currentChar = (unsigned long)(*atNumberCharacter), lowerCaseCC = currentChar | 0x20UL;
-
- switch(numberState) {
- case JSONNumberStateWholeNumberStart: if (currentChar == '-') { numberState = JSONNumberStateWholeNumberMinus; isNegative = 1; break; }
- case JSONNumberStateWholeNumberMinus: if (currentChar == '0') { numberState = JSONNumberStateWholeNumberZero; break; }
- else if( (currentChar >= '1') && (currentChar <= '9')) { numberState = JSONNumberStateWholeNumber; break; }
- else { /* XXX Add error message */ numberState = JSONNumberStateError; break; }
- case JSONNumberStateExponentStart: if( (currentChar == '+') || (currentChar == '-')) { numberState = JSONNumberStateExponentPlusMinus; break; }
- case JSONNumberStateFractionalNumberStart:
- case JSONNumberStateExponentPlusMinus:if(!((currentChar >= '0') && (currentChar <= '9'))) { /* XXX Add error message */ numberState = JSONNumberStateError; break; }
- else { if(numberState == JSONNumberStateFractionalNumberStart) { numberState = JSONNumberStateFractionalNumber; }
- else { numberState = JSONNumberStateExponent; } break; }
- case JSONNumberStateWholeNumberZero:
- case JSONNumberStateWholeNumber: if (currentChar == '.') { numberState = JSONNumberStateFractionalNumberStart; isFloatingPoint = 1; break; }
- case JSONNumberStateFractionalNumber: if (lowerCaseCC == 'e') { numberState = JSONNumberStateExponentStart; isFloatingPoint = 1; break; }
- case JSONNumberStateExponent: if(!((currentChar >= '0') && (currentChar <= '9')) || (numberState == JSONNumberStateWholeNumberZero)) { numberState = JSONNumberStateFinished; backup = 1; break; }
- break;
- default: /* XXX Add error message */ numberState = JSONNumberStateError; break;
- }
- }
-
- parseState->token.tokenPtrRange.ptr = parseState->stringBuffer.bytes.ptr + startingIndex;
- parseState->token.tokenPtrRange.length = (atNumberCharacter - parseState->token.tokenPtrRange.ptr) - backup;
- parseState->atIndex = (parseState->token.tokenPtrRange.ptr + parseState->token.tokenPtrRange.length) - parseState->stringBuffer.bytes.ptr;
-
- if(JK_EXPECT_T(numberState == JSONNumberStateFinished)) {
- unsigned char numberTempBuf[parseState->token.tokenPtrRange.length + 4UL];
- unsigned char *endOfNumber = NULL;
-
- memcpy(numberTempBuf, parseState->token.tokenPtrRange.ptr, parseState->token.tokenPtrRange.length);
- numberTempBuf[parseState->token.tokenPtrRange.length] = 0;
-
- errno = 0;
-
- // Treat "-0" as a floating point number, which is capable of representing negative zeros.
- if(JK_EXPECT_F(parseState->token.tokenPtrRange.length == 2UL) && JK_EXPECT_F(numberTempBuf[1] == '0') && JK_EXPECT_F(isNegative)) { isFloatingPoint = 1; }
-
- if(isFloatingPoint) {
- parseState->token.value.number.doubleValue = strtod((const char *)numberTempBuf, (char **)&endOfNumber); // strtod is documented to return U+2261 (identical to) 0.0 on an underflow error (along with setting errno to ERANGE).
- parseState->token.value.type = JKValueTypeDouble;
- parseState->token.value.ptrRange.ptr = (const unsigned char *)&parseState->token.value.number.doubleValue;
- parseState->token.value.ptrRange.length = sizeof(double);
- parseState->token.value.hash = (JK_HASH_INIT + parseState->token.value.type);
- } else {
- if(isNegative) {
- parseState->token.value.number.longLongValue = strtoll((const char *)numberTempBuf, (char **)&endOfNumber, 10);
- parseState->token.value.type = JKValueTypeLongLong;
- parseState->token.value.ptrRange.ptr = (const unsigned char *)&parseState->token.value.number.longLongValue;
- parseState->token.value.ptrRange.length = sizeof(long long);
- parseState->token.value.hash = (JK_HASH_INIT + parseState->token.value.type) + (JKHash)parseState->token.value.number.longLongValue;
- } else {
- parseState->token.value.number.unsignedLongLongValue = strtoull((const char *)numberTempBuf, (char **)&endOfNumber, 10);
- parseState->token.value.type = JKValueTypeUnsignedLongLong;
- parseState->token.value.ptrRange.ptr = (const unsigned char *)&parseState->token.value.number.unsignedLongLongValue;
- parseState->token.value.ptrRange.length = sizeof(unsigned long long);
- parseState->token.value.hash = (JK_HASH_INIT + parseState->token.value.type) + (JKHash)parseState->token.value.number.unsignedLongLongValue;
- }
- }
-
- if(JK_EXPECT_F(errno != 0)) {
- numberState = JSONNumberStateError;
- if(errno == ERANGE) {
- switch(parseState->token.value.type) {
- case JKValueTypeDouble: jk_error(parseState, @"The value '%s' could not be represented as a 'double' due to %s.", numberTempBuf, (parseState->token.value.number.doubleValue == 0.0) ? "underflow" : "overflow"); break; // see above for == 0.0.
- case JKValueTypeLongLong: jk_error(parseState, @"The value '%s' exceeded the minimum value that could be represented: %lld.", numberTempBuf, parseState->token.value.number.longLongValue); break;
- case JKValueTypeUnsignedLongLong: jk_error(parseState, @"The value '%s' exceeded the maximum value that could be represented: %llu.", numberTempBuf, parseState->token.value.number.unsignedLongLongValue); break;
- default: jk_error(parseState, @"Internal error: Unknown token value type. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); break;
- }
- }
- }
- if(JK_EXPECT_F(endOfNumber != &numberTempBuf[parseState->token.tokenPtrRange.length]) && JK_EXPECT_F(numberState != JSONNumberStateError)) { numberState = JSONNumberStateError; jk_error(parseState, @"The conversion function did not consume all of the number tokens characters."); }
-
- size_t hashIndex = 0UL;
- for(hashIndex = 0UL; hashIndex < parseState->token.value.ptrRange.length; hashIndex++) { parseState->token.value.hash = jk_calculateHash(parseState->token.value.hash, parseState->token.value.ptrRange.ptr[hashIndex]); }
- }
-
- if(JK_EXPECT_F(numberState != JSONNumberStateFinished)) { jk_error(parseState, @"Invalid number."); }
- return(JK_EXPECT_T((numberState == JSONNumberStateFinished)) ? 0 : 1);
-}
-
-JK_STATIC_INLINE void jk_set_parsed_token(JKParseState *parseState, const unsigned char *ptr, size_t length, JKTokenType type, size_t advanceBy) {
- parseState->token.tokenPtrRange.ptr = ptr;
- parseState->token.tokenPtrRange.length = length;
- parseState->token.type = type;
- parseState->atIndex += advanceBy;
-}
-
-static size_t jk_parse_is_newline(JKParseState *parseState, const unsigned char *atCharacterPtr) {
- NSCParameterAssert((parseState != NULL) && (atCharacterPtr != NULL) && (atCharacterPtr >= parseState->stringBuffer.bytes.ptr) && (atCharacterPtr < JK_END_STRING_PTR(parseState)));
- const unsigned char *endOfStringPtr = JK_END_STRING_PTR(parseState);
-
- if(JK_EXPECT_F(atCharacterPtr >= endOfStringPtr)) { return(0UL); }
-
- if(JK_EXPECT_F((*(atCharacterPtr + 0)) == '\n')) { return(1UL); }
- if(JK_EXPECT_F((*(atCharacterPtr + 0)) == '\r')) { if((JK_EXPECT_T((atCharacterPtr + 1) < endOfStringPtr)) && ((*(atCharacterPtr + 1)) == '\n')) { return(2UL); } return(1UL); }
- if(parseState->parseOptionFlags & JKParseOptionUnicodeNewlines) {
- if((JK_EXPECT_F((*(atCharacterPtr + 0)) == 0xc2)) && (((atCharacterPtr + 1) < endOfStringPtr) && ((*(atCharacterPtr + 1)) == 0x85))) { return(2UL); }
- if((JK_EXPECT_F((*(atCharacterPtr + 0)) == 0xe2)) && (((atCharacterPtr + 2) < endOfStringPtr) && ((*(atCharacterPtr + 1)) == 0x80) && (((*(atCharacterPtr + 2)) == 0xa8) || ((*(atCharacterPtr + 2)) == 0xa9)))) { return(3UL); }
- }
-
- return(0UL);
-}
-
-JK_STATIC_INLINE int jk_parse_skip_newline(JKParseState *parseState) {
- size_t newlineAdvanceAtIndex = 0UL;
- if(JK_EXPECT_F((newlineAdvanceAtIndex = jk_parse_is_newline(parseState, JK_AT_STRING_PTR(parseState))) > 0UL)) { parseState->lineNumber++; parseState->atIndex += (newlineAdvanceAtIndex - 1UL); parseState->lineStartIndex = parseState->atIndex + 1UL; return(1); }
- return(0);
-}
-
-JK_STATIC_INLINE void jk_parse_skip_whitespace(JKParseState *parseState) {
-#ifndef __clang_analyzer__
- NSCParameterAssert((parseState != NULL) && (JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)));
- const unsigned char *atCharacterPtr = NULL;
- const unsigned char *endOfStringPtr = JK_END_STRING_PTR(parseState);
-
- for(atCharacterPtr = JK_AT_STRING_PTR(parseState); (JK_EXPECT_T((atCharacterPtr = JK_AT_STRING_PTR(parseState)) < endOfStringPtr)); parseState->atIndex++) {
- if(((*(atCharacterPtr + 0)) == ' ') || ((*(atCharacterPtr + 0)) == '\t')) { continue; }
- if(jk_parse_skip_newline(parseState)) { continue; }
- if(parseState->parseOptionFlags & JKParseOptionComments) {
- if((JK_EXPECT_F((*(atCharacterPtr + 0)) == '/')) && (JK_EXPECT_T((atCharacterPtr + 1) < endOfStringPtr))) {
- if((*(atCharacterPtr + 1)) == '/') {
- parseState->atIndex++;
- for(atCharacterPtr = JK_AT_STRING_PTR(parseState); (JK_EXPECT_T((atCharacterPtr = JK_AT_STRING_PTR(parseState)) < endOfStringPtr)); parseState->atIndex++) { if(jk_parse_skip_newline(parseState)) { break; } }
- continue;
- }
- if((*(atCharacterPtr + 1)) == '*') {
- parseState->atIndex++;
- for(atCharacterPtr = JK_AT_STRING_PTR(parseState); (JK_EXPECT_T((atCharacterPtr = JK_AT_STRING_PTR(parseState)) < endOfStringPtr)); parseState->atIndex++) {
- if(jk_parse_skip_newline(parseState)) { continue; }
- if(((*(atCharacterPtr + 0)) == '*') && (((atCharacterPtr + 1) < endOfStringPtr) && ((*(atCharacterPtr + 1)) == '/'))) { parseState->atIndex++; break; }
- }
- continue;
- }
- }
- }
- break;
- }
-#endif
-}
-
-static int jk_parse_next_token(JKParseState *parseState) {
- NSCParameterAssert((parseState != NULL) && (JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)));
- const unsigned char *atCharacterPtr = NULL;
- const unsigned char *endOfStringPtr = JK_END_STRING_PTR(parseState);
- unsigned char currentCharacter = 0U;
- int stopParsing = 0;
-
- parseState->prev_atIndex = parseState->atIndex;
- parseState->prev_lineNumber = parseState->lineNumber;
- parseState->prev_lineStartIndex = parseState->lineStartIndex;
-
- jk_parse_skip_whitespace(parseState);
-
- if((JK_AT_STRING_PTR(parseState) == endOfStringPtr)) { stopParsing = 1; }
-
- if((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T((atCharacterPtr = JK_AT_STRING_PTR(parseState)) < endOfStringPtr))) {
- currentCharacter = *atCharacterPtr;
-
- if(JK_EXPECT_T(currentCharacter == '"')) { if(JK_EXPECT_T((stopParsing = jk_parse_string(parseState)) == 0)) { jk_set_parsed_token(parseState, parseState->token.tokenPtrRange.ptr, parseState->token.tokenPtrRange.length, JKTokenTypeString, 0UL); } }
- else if(JK_EXPECT_T(currentCharacter == ':')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeSeparator, 1UL); }
- else if(JK_EXPECT_T(currentCharacter == ',')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeComma, 1UL); }
- else if((JK_EXPECT_T(currentCharacter >= '0') && JK_EXPECT_T(currentCharacter <= '9')) || JK_EXPECT_T(currentCharacter == '-')) { if(JK_EXPECT_T((stopParsing = jk_parse_number(parseState)) == 0)) { jk_set_parsed_token(parseState, parseState->token.tokenPtrRange.ptr, parseState->token.tokenPtrRange.length, JKTokenTypeNumber, 0UL); } }
- else if(JK_EXPECT_T(currentCharacter == '{')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeObjectBegin, 1UL); }
- else if(JK_EXPECT_T(currentCharacter == '}')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeObjectEnd, 1UL); }
- else if(JK_EXPECT_T(currentCharacter == '[')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeArrayBegin, 1UL); }
- else if(JK_EXPECT_T(currentCharacter == ']')) { jk_set_parsed_token(parseState, atCharacterPtr, 1UL, JKTokenTypeArrayEnd, 1UL); }
-
- else if(JK_EXPECT_T(currentCharacter == 't')) { if(!((JK_EXPECT_T((atCharacterPtr + 4UL) < endOfStringPtr)) && (JK_EXPECT_T(atCharacterPtr[1] == 'r')) && (JK_EXPECT_T(atCharacterPtr[2] == 'u')) && (JK_EXPECT_T(atCharacterPtr[3] == 'e')))) { stopParsing = 1; /* XXX Add error message */ } else { jk_set_parsed_token(parseState, atCharacterPtr, 4UL, JKTokenTypeTrue, 4UL); } }
- else if(JK_EXPECT_T(currentCharacter == 'f')) { if(!((JK_EXPECT_T((atCharacterPtr + 5UL) < endOfStringPtr)) && (JK_EXPECT_T(atCharacterPtr[1] == 'a')) && (JK_EXPECT_T(atCharacterPtr[2] == 'l')) && (JK_EXPECT_T(atCharacterPtr[3] == 's')) && (JK_EXPECT_T(atCharacterPtr[4] == 'e')))) { stopParsing = 1; /* XXX Add error message */ } else { jk_set_parsed_token(parseState, atCharacterPtr, 5UL, JKTokenTypeFalse, 5UL); } }
- else if(JK_EXPECT_T(currentCharacter == 'n')) { if(!((JK_EXPECT_T((atCharacterPtr + 4UL) < endOfStringPtr)) && (JK_EXPECT_T(atCharacterPtr[1] == 'u')) && (JK_EXPECT_T(atCharacterPtr[2] == 'l')) && (JK_EXPECT_T(atCharacterPtr[3] == 'l')))) { stopParsing = 1; /* XXX Add error message */ } else { jk_set_parsed_token(parseState, atCharacterPtr, 4UL, JKTokenTypeNull, 4UL); } }
- else { stopParsing = 1; /* XXX Add error message */ }
- }
-
- if(JK_EXPECT_F(stopParsing)) { jk_error(parseState, @"Unexpected token, wanted '{', '}', '[', ']', ',', ':', 'true', 'false', 'null', '\"STRING\"', 'NUMBER'."); }
- return(stopParsing);
-}
-
-static void jk_error_parse_accept_or3(JKParseState *parseState, int state, NSString *or1String, NSString *or2String, NSString *or3String) {
- NSString *acceptStrings[16];
- int acceptIdx = 0;
- if(state & JKParseAcceptValue) { acceptStrings[acceptIdx++] = or1String; }
- if(state & JKParseAcceptComma) { acceptStrings[acceptIdx++] = or2String; }
- if(state & JKParseAcceptEnd) { acceptStrings[acceptIdx++] = or3String; }
- if(acceptIdx == 1) { jk_error(parseState, @"Expected %@, not '%*.*s'", acceptStrings[0], (int)parseState->token.tokenPtrRange.length, (int)parseState->token.tokenPtrRange.length, parseState->token.tokenPtrRange.ptr); }
- else if(acceptIdx == 2) { jk_error(parseState, @"Expected %@ or %@, not '%*.*s'", acceptStrings[0], acceptStrings[1], (int)parseState->token.tokenPtrRange.length, (int)parseState->token.tokenPtrRange.length, parseState->token.tokenPtrRange.ptr); }
- else if(acceptIdx == 3) { jk_error(parseState, @"Expected %@, %@, or %@, not '%*.*s", acceptStrings[0], acceptStrings[1], acceptStrings[2], (int)parseState->token.tokenPtrRange.length, (int)parseState->token.tokenPtrRange.length, parseState->token.tokenPtrRange.ptr); }
-}
-
-static void *jk_parse_array(JKParseState *parseState) {
- size_t startingObjectIndex = parseState->objectStack.index;
- int arrayState = JKParseAcceptValueOrEnd, stopParsing = 0;
- void *parsedArray = NULL;
-
- while(JK_EXPECT_T((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T(parseState->atIndex < parseState->stringBuffer.bytes.length)))) {
- if(JK_EXPECT_F(parseState->objectStack.index > (parseState->objectStack.count - 4UL))) { if(jk_objectStack_resize(&parseState->objectStack, parseState->objectStack.count + 128UL)) { jk_error(parseState, @"Internal error: [array] objectsIndex > %zu, resize failed? %@ line %#ld", (parseState->objectStack.count - 4UL), [NSString stringWithUTF8String:__FILE__], (long)__LINE__); break; } }
-
- if(JK_EXPECT_T((stopParsing = jk_parse_next_token(parseState)) == 0)) {
- void *object = NULL;
-#ifndef NS_BLOCK_ASSERTIONS
- parseState->objectStack.objects[parseState->objectStack.index] = NULL;
- parseState->objectStack.keys [parseState->objectStack.index] = NULL;
-#endif
- switch(parseState->token.type) {
- case JKTokenTypeNumber:
- case JKTokenTypeString:
- case JKTokenTypeTrue:
- case JKTokenTypeFalse:
- case JKTokenTypeNull:
- case JKTokenTypeArrayBegin:
- case JKTokenTypeObjectBegin:
- if(JK_EXPECT_F((arrayState & JKParseAcceptValue) == 0)) { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected value."); stopParsing = 1; break; }
- if(JK_EXPECT_F((object = jk_object_for_token(parseState)) == NULL)) { jk_error(parseState, @"Internal error: Object == NULL"); stopParsing = 1; break; } else { parseState->objectStack.objects[parseState->objectStack.index++] = object; arrayState = JKParseAcceptCommaOrEnd; }
- break;
- case JKTokenTypeArrayEnd: if(JK_EXPECT_T(arrayState & JKParseAcceptEnd)) { NSCParameterAssert(parseState->objectStack.index >= startingObjectIndex); parsedArray = (void *)_JKArrayCreate((id *)&parseState->objectStack.objects[startingObjectIndex], (parseState->objectStack.index - startingObjectIndex), parseState->mutableCollections); } else { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected ']'."); } stopParsing = 1; break;
- case JKTokenTypeComma: if(JK_EXPECT_T(arrayState & JKParseAcceptComma)) { arrayState = JKParseAcceptValue; } else { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected ','."); stopParsing = 1; } break;
- default: parseState->errorIsPrev = 1; jk_error_parse_accept_or3(parseState, arrayState, @"a value", @"a comma", @"a ']'"); stopParsing = 1; break;
- }
- }
- }
-
- if(JK_EXPECT_F(parsedArray == NULL)) { size_t idx = 0UL; for(idx = startingObjectIndex; idx < parseState->objectStack.index; idx++) { if(parseState->objectStack.objects[idx] != NULL) { CFRelease(parseState->objectStack.objects[idx]); parseState->objectStack.objects[idx] = NULL; } } }
-#if !defined(NS_BLOCK_ASSERTIONS)
- else { size_t idx = 0UL; for(idx = startingObjectIndex; idx < parseState->objectStack.index; idx++) { parseState->objectStack.objects[idx] = NULL; parseState->objectStack.keys[idx] = NULL; } }
-#endif
-
- parseState->objectStack.index = startingObjectIndex;
- return(parsedArray);
-}
-
-static void *jk_create_dictionary(JKParseState *parseState, size_t startingObjectIndex) {
- void *parsedDictionary = NULL;
-
- parseState->objectStack.index--;
-
- parsedDictionary = _JKDictionaryCreate((id *)&parseState->objectStack.keys[startingObjectIndex], (NSUInteger *)&parseState->objectStack.cfHashes[startingObjectIndex], (id *)&parseState->objectStack.objects[startingObjectIndex], (parseState->objectStack.index - startingObjectIndex), parseState->mutableCollections);
-
- return(parsedDictionary);
-}
-
-static void *jk_parse_dictionary(JKParseState *parseState) {
- size_t startingObjectIndex = parseState->objectStack.index;
- int dictState = JKParseAcceptValueOrEnd, stopParsing = 0;
- void *parsedDictionary = NULL;
-
- while(JK_EXPECT_T((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T(parseState->atIndex < parseState->stringBuffer.bytes.length)))) {
- if(JK_EXPECT_F(parseState->objectStack.index > (parseState->objectStack.count - 4UL))) { if(jk_objectStack_resize(&parseState->objectStack, parseState->objectStack.count + 128UL)) { jk_error(parseState, @"Internal error: [dictionary] objectsIndex > %zu, resize failed? %@ line #%ld", (parseState->objectStack.count - 4UL), [NSString stringWithUTF8String:__FILE__], (long)__LINE__); break; } }
-
- size_t objectStackIndex = parseState->objectStack.index++;
- parseState->objectStack.keys[objectStackIndex] = NULL;
- parseState->objectStack.objects[objectStackIndex] = NULL;
- void *key = NULL, *object = NULL;
-
- if(JK_EXPECT_T((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T((stopParsing = jk_parse_next_token(parseState)) == 0)))) {
- switch(parseState->token.type) {
- case JKTokenTypeString:
- if(JK_EXPECT_F((dictState & JKParseAcceptValue) == 0)) { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected string."); stopParsing = 1; break; }
- if(JK_EXPECT_F((key = jk_object_for_token(parseState)) == NULL)) { jk_error(parseState, @"Internal error: Key == NULL."); stopParsing = 1; break; }
- else {
- parseState->objectStack.keys[objectStackIndex] = key;
- if(JK_EXPECT_T(parseState->token.value.cacheItem != NULL)) { if(JK_EXPECT_F(parseState->token.value.cacheItem->cfHash == 0UL)) { parseState->token.value.cacheItem->cfHash = CFHash(key); } parseState->objectStack.cfHashes[objectStackIndex] = parseState->token.value.cacheItem->cfHash; }
- else { parseState->objectStack.cfHashes[objectStackIndex] = CFHash(key); }
- }
- break;
-
- case JKTokenTypeObjectEnd: if((JK_EXPECT_T(dictState & JKParseAcceptEnd))) { NSCParameterAssert(parseState->objectStack.index >= startingObjectIndex); parsedDictionary = jk_create_dictionary(parseState, startingObjectIndex); } else { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected '}'."); } stopParsing = 1; break;
- case JKTokenTypeComma: if((JK_EXPECT_T(dictState & JKParseAcceptComma))) { dictState = JKParseAcceptValue; parseState->objectStack.index--; continue; } else { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected ','."); stopParsing = 1; } break;
-
- default: parseState->errorIsPrev = 1; jk_error_parse_accept_or3(parseState, dictState, @"a \"STRING\"", @"a comma", @"a '}'"); stopParsing = 1; break;
- }
- }
-
- if(JK_EXPECT_T(stopParsing == 0)) {
- if(JK_EXPECT_T((stopParsing = jk_parse_next_token(parseState)) == 0)) { if(JK_EXPECT_F(parseState->token.type != JKTokenTypeSeparator)) { parseState->errorIsPrev = 1; jk_error(parseState, @"Expected ':'."); stopParsing = 1; } }
- }
-
- if((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T((stopParsing = jk_parse_next_token(parseState)) == 0))) {
- switch(parseState->token.type) {
- case JKTokenTypeNumber:
- case JKTokenTypeString:
- case JKTokenTypeTrue:
- case JKTokenTypeFalse:
- case JKTokenTypeNull:
- case JKTokenTypeArrayBegin:
- case JKTokenTypeObjectBegin:
- if(JK_EXPECT_F((dictState & JKParseAcceptValue) == 0)) { parseState->errorIsPrev = 1; jk_error(parseState, @"Unexpected value."); stopParsing = 1; break; }
- if(JK_EXPECT_F((object = jk_object_for_token(parseState)) == NULL)) { jk_error(parseState, @"Internal error: Object == NULL."); stopParsing = 1; break; } else { parseState->objectStack.objects[objectStackIndex] = object; dictState = JKParseAcceptCommaOrEnd; }
- break;
- default: parseState->errorIsPrev = 1; jk_error_parse_accept_or3(parseState, dictState, @"a value", @"a comma", @"a '}'"); stopParsing = 1; break;
- }
- }
- }
-
- if(JK_EXPECT_F(parsedDictionary == NULL)) { size_t idx = 0UL; for(idx = startingObjectIndex; idx < parseState->objectStack.index; idx++) { if(parseState->objectStack.keys[idx] != NULL) { CFRelease(parseState->objectStack.keys[idx]); parseState->objectStack.keys[idx] = NULL; } if(parseState->objectStack.objects[idx] != NULL) { CFRelease(parseState->objectStack.objects[idx]); parseState->objectStack.objects[idx] = NULL; } } }
-#if !defined(NS_BLOCK_ASSERTIONS)
- else { size_t idx = 0UL; for(idx = startingObjectIndex; idx < parseState->objectStack.index; idx++) { parseState->objectStack.objects[idx] = NULL; parseState->objectStack.keys[idx] = NULL; } }
-#endif
-
- parseState->objectStack.index = startingObjectIndex;
- return(parsedDictionary);
-}
-
-static id json_parse_it(JKParseState *parseState) {
- id parsedObject = NULL;
- int stopParsing = 0;
-
- while((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T(parseState->atIndex < parseState->stringBuffer.bytes.length))) {
- if((JK_EXPECT_T(stopParsing == 0)) && (JK_EXPECT_T((stopParsing = jk_parse_next_token(parseState)) == 0))) {
- switch(parseState->token.type) {
- case JKTokenTypeArrayBegin:
- case JKTokenTypeObjectBegin: parsedObject = [(id)jk_object_for_token(parseState) autorelease]; stopParsing = 1; break;
- default: jk_error(parseState, @"Expected either '[' or '{'."); stopParsing = 1; break;
- }
- }
- }
-
- NSCParameterAssert((parseState->objectStack.index == 0) && (JK_AT_STRING_PTR(parseState) <= JK_END_STRING_PTR(parseState)));
-
- if((parsedObject == NULL) && (JK_AT_STRING_PTR(parseState) == JK_END_STRING_PTR(parseState))) { jk_error(parseState, @"Reached the end of the buffer."); }
- if(parsedObject == NULL) { jk_error(parseState, @"Unable to parse JSON."); }
-
- if((parsedObject != NULL) && (JK_AT_STRING_PTR(parseState) < JK_END_STRING_PTR(parseState))) {
- jk_parse_skip_whitespace(parseState);
- if((parsedObject != NULL) && ((parseState->parseOptionFlags & JKParseOptionPermitTextAfterValidJSON) == 0) && (JK_AT_STRING_PTR(parseState) < JK_END_STRING_PTR(parseState))) {
- jk_error(parseState, @"A valid JSON object was parsed but there were additional non-white-space characters remaining.");
- parsedObject = NULL;
- }
- }
-
- return(parsedObject);
-}
-
-////////////
-#pragma mark -
-#pragma mark Object cache
-
-// This uses a Galois Linear Feedback Shift Register (LFSR) PRNG to pick which item in the cache to age. It has a period of (2^32)-1.
-// NOTE: A LFSR *MUST* be initialized to a non-zero value and must always have a non-zero value. The LFSR is initalized to 1 in -initWithParseOptions:
-JK_STATIC_INLINE void jk_cache_age(JKParseState *parseState) {
- NSCParameterAssert((parseState != NULL) && (parseState->cache.prng_lfsr != 0U));
- parseState->cache.prng_lfsr = (parseState->cache.prng_lfsr >> 1) ^ ((0U - (parseState->cache.prng_lfsr & 1U)) & 0x80200003U);
- parseState->cache.age[parseState->cache.prng_lfsr & (parseState->cache.count - 1UL)] >>= 1;
-}
-
-// The object cache is nothing more than a hash table with open addressing collision resolution that is bounded by JK_CACHE_PROBES attempts.
-//
-// The hash table is a linear C array of JKTokenCacheItem. The terms "item" and "bucket" are synonymous with the index in to the cache array, i.e. cache.items[bucket].
-//
-// Items in the cache have an age associated with them. An items age is incremented using saturating unsigned arithmetic and decremeted using unsigned right shifts.
-// Thus, an items age is managed using an AIMD policy- additive increase, multiplicative decrease. All age calculations and manipulations are branchless.
-// The primitive C type MUST be unsigned. It is currently a "char", which allows (at a minimum and in practice) 8 bits.
-//
-// A "useable bucket" is a bucket that is not in use (never populated), or has an age == 0.
-//
-// When an item is found in the cache, it's age is incremented.
-// If a useable bucket hasn't been found, the current item (bucket) is aged along with two random items.
-//
-// If a value is not found in the cache, and no useable bucket has been found, that value is not added to the cache.
-
-static void *jk_cachedObjects(JKParseState *parseState) {
- unsigned long bucket = parseState->token.value.hash & (parseState->cache.count - 1UL), setBucket = 0UL, useableBucket = 0UL, x = 0UL;
- void *parsedAtom = NULL;
-
- if(JK_EXPECT_F(parseState->token.value.ptrRange.length == 0UL) && JK_EXPECT_T(parseState->token.value.type == JKValueTypeString)) { return(@""); }
-
- for(x = 0UL; x < JK_CACHE_PROBES; x++) {
- if(JK_EXPECT_F(parseState->cache.items[bucket].object == NULL)) { setBucket = 1UL; useableBucket = bucket; break; }
-
- if((JK_EXPECT_T(parseState->cache.items[bucket].hash == parseState->token.value.hash)) && (JK_EXPECT_T(parseState->cache.items[bucket].size == parseState->token.value.ptrRange.length)) && (JK_EXPECT_T(parseState->cache.items[bucket].type == parseState->token.value.type)) && (JK_EXPECT_T(parseState->cache.items[bucket].bytes != NULL)) && (JK_EXPECT_T(memcmp(parseState->cache.items[bucket].bytes, parseState->token.value.ptrRange.ptr, parseState->token.value.ptrRange.length) == 0U))) {
- parseState->cache.age[bucket] = (((uint32_t)parseState->cache.age[bucket]) + 1U) - (((((uint32_t)parseState->cache.age[bucket]) + 1U) >> 31) ^ 1U);
- parseState->token.value.cacheItem = &parseState->cache.items[bucket];
- NSCParameterAssert(parseState->cache.items[bucket].object != NULL);
- return((void *)CFRetain(parseState->cache.items[bucket].object));
- } else {
- if(JK_EXPECT_F(setBucket == 0UL) && JK_EXPECT_F(parseState->cache.age[bucket] == 0U)) { setBucket = 1UL; useableBucket = bucket; }
- if(JK_EXPECT_F(setBucket == 0UL)) { parseState->cache.age[bucket] >>= 1; jk_cache_age(parseState); jk_cache_age(parseState); }
- // This is the open addressing function. The values length and type are used as a form of "double hashing" to distribute values with the same effective value hash across different object cache buckets.
- // The values type is a prime number that is relatively coprime to the other primes in the set of value types and the number of hash table buckets.
- bucket = (parseState->token.value.hash + (parseState->token.value.ptrRange.length * (x + 1UL)) + (parseState->token.value.type * (x + 1UL)) + (3UL * (x + 1UL))) & (parseState->cache.count - 1UL);
- }
- }
-
- switch(parseState->token.value.type) {
- case JKValueTypeString: parsedAtom = (void *)CFStringCreateWithBytes(NULL, parseState->token.value.ptrRange.ptr, parseState->token.value.ptrRange.length, kCFStringEncodingUTF8, 0); break;
- case JKValueTypeLongLong: parsedAtom = (void *)CFNumberCreate(NULL, kCFNumberLongLongType, &parseState->token.value.number.longLongValue); break;
- case JKValueTypeUnsignedLongLong:
- if(parseState->token.value.number.unsignedLongLongValue <= LLONG_MAX) { parsedAtom = (void *)CFNumberCreate(NULL, kCFNumberLongLongType, &parseState->token.value.number.unsignedLongLongValue); }
- else { parsedAtom = (void *)parseState->objCImpCache.NSNumberInitWithUnsignedLongLong(parseState->objCImpCache.NSNumberAlloc(parseState->objCImpCache.NSNumberClass, @selector(alloc)), @selector(initWithUnsignedLongLong:), parseState->token.value.number.unsignedLongLongValue); }
- break;
- case JKValueTypeDouble: parsedAtom = (void *)CFNumberCreate(NULL, kCFNumberDoubleType, &parseState->token.value.number.doubleValue); break;
- default: jk_error(parseState, @"Internal error: Unknown token value type. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); break;
- }
-
- if(JK_EXPECT_T(setBucket) && (JK_EXPECT_T(parsedAtom != NULL))) {
- bucket = useableBucket;
- if(JK_EXPECT_T((parseState->cache.items[bucket].object != NULL))) { CFRelease(parseState->cache.items[bucket].object); parseState->cache.items[bucket].object = NULL; }
-
- if(JK_EXPECT_T((parseState->cache.items[bucket].bytes = (unsigned char *)reallocf(parseState->cache.items[bucket].bytes, parseState->token.value.ptrRange.length)) != NULL)) {
- memcpy(parseState->cache.items[bucket].bytes, parseState->token.value.ptrRange.ptr, parseState->token.value.ptrRange.length);
- parseState->cache.items[bucket].object = (void *)CFRetain(parsedAtom);
- parseState->cache.items[bucket].hash = parseState->token.value.hash;
- parseState->cache.items[bucket].cfHash = 0UL;
- parseState->cache.items[bucket].size = parseState->token.value.ptrRange.length;
- parseState->cache.items[bucket].type = parseState->token.value.type;
- parseState->token.value.cacheItem = &parseState->cache.items[bucket];
- parseState->cache.age[bucket] = JK_INIT_CACHE_AGE;
- } else { // The realloc failed, so clear the appropriate fields.
- parseState->cache.items[bucket].hash = 0UL;
- parseState->cache.items[bucket].cfHash = 0UL;
- parseState->cache.items[bucket].size = 0UL;
- parseState->cache.items[bucket].type = 0UL;
- }
- }
-
- return(parsedAtom);
-}
-
-
-static void *jk_object_for_token(JKParseState *parseState) {
- void *parsedAtom = NULL;
-
- parseState->token.value.cacheItem = NULL;
- switch(parseState->token.type) {
- case JKTokenTypeString: parsedAtom = jk_cachedObjects(parseState); break;
- case JKTokenTypeNumber: parsedAtom = jk_cachedObjects(parseState); break;
- case JKTokenTypeObjectBegin: parsedAtom = jk_parse_dictionary(parseState); break;
- case JKTokenTypeArrayBegin: parsedAtom = jk_parse_array(parseState); break;
- case JKTokenTypeTrue: parsedAtom = (void *)kCFBooleanTrue; break;
- case JKTokenTypeFalse: parsedAtom = (void *)kCFBooleanFalse; break;
- case JKTokenTypeNull: parsedAtom = (void *)kCFNull; break;
- default: jk_error(parseState, @"Internal error: Unknown token type. %@ line #%ld", [NSString stringWithUTF8String:__FILE__], (long)__LINE__); break;
- }
-
- return(parsedAtom);
-}
-
-#pragma mark -
-@implementation JSONDecoder
-
-+ (id)decoder
-{
- return([self decoderWithParseOptions:JKParseOptionStrict]);
-}
-
-+ (id)decoderWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- return([[[self alloc] initWithParseOptions:parseOptionFlags] autorelease]);
-}
-
-- (id)init
-{
- return([self initWithParseOptions:JKParseOptionStrict]);
-}
-
-- (id)initWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- if((self = [super init]) == NULL) { return(NULL); }
-
- if(parseOptionFlags & ~JKParseOptionValidFlags) { [self autorelease]; [NSException raise:NSInvalidArgumentException format:@"Invalid parse options."]; }
-
- if((parseState = (JKParseState *)calloc(1UL, sizeof(JKParseState))) == NULL) { goto errorExit; }
-
- parseState->parseOptionFlags = parseOptionFlags;
-
- parseState->token.tokenBuffer.roundSizeUpToMultipleOf = 4096UL;
- parseState->objectStack.roundSizeUpToMultipleOf = 2048UL;
-
- parseState->objCImpCache.NSNumberClass = _jk_NSNumberClass;
- parseState->objCImpCache.NSNumberAlloc = _jk_NSNumberAllocImp;
- parseState->objCImpCache.NSNumberInitWithUnsignedLongLong = _jk_NSNumberInitWithUnsignedLongLongImp;
-
- parseState->cache.prng_lfsr = 1U;
- parseState->cache.count = JK_CACHE_SLOTS;
- if((parseState->cache.items = (JKTokenCacheItem *)calloc(1UL, sizeof(JKTokenCacheItem) * parseState->cache.count)) == NULL) { goto errorExit; }
-
- return(self);
-
- errorExit:
- if(self) { [self autorelease]; self = NULL; }
- return(NULL);
-}
-
-// This is here primarily to support the NSString and NSData convenience functions so the autoreleased JSONDecoder can release most of its resources before the pool pops.
-static void _JSONDecoderCleanup(JSONDecoder *decoder) {
- if((decoder != NULL) && (decoder->parseState != NULL)) {
- jk_managedBuffer_release(&decoder->parseState->token.tokenBuffer);
- jk_objectStack_release(&decoder->parseState->objectStack);
-
- [decoder clearCache];
- if(decoder->parseState->cache.items != NULL) { free(decoder->parseState->cache.items); decoder->parseState->cache.items = NULL; }
-
- free(decoder->parseState); decoder->parseState = NULL;
- }
-}
-
-- (void)dealloc
-{
- _JSONDecoderCleanup(self);
- [super dealloc];
-}
-
-- (void)clearCache
-{
- if(JK_EXPECT_T(parseState != NULL)) {
- if(JK_EXPECT_T(parseState->cache.items != NULL)) {
- size_t idx = 0UL;
- for(idx = 0UL; idx < parseState->cache.count; idx++) {
- if(JK_EXPECT_T(parseState->cache.items[idx].object != NULL)) { CFRelease(parseState->cache.items[idx].object); parseState->cache.items[idx].object = NULL; }
- if(JK_EXPECT_T(parseState->cache.items[idx].bytes != NULL)) { free(parseState->cache.items[idx].bytes); parseState->cache.items[idx].bytes = NULL; }
- memset(&parseState->cache.items[idx], 0, sizeof(JKTokenCacheItem));
- parseState->cache.age[idx] = 0U;
- }
- }
- }
-}
-
-// This needs to be completely rewritten.
-static id _JKParseUTF8String(JKParseState *parseState, BOOL mutableCollections, const unsigned char *string, size_t length, NSError **error) {
- NSCParameterAssert((parseState != NULL) && (string != NULL) && (parseState->cache.prng_lfsr != 0U));
- parseState->stringBuffer.bytes.ptr = string;
- parseState->stringBuffer.bytes.length = length;
- parseState->atIndex = 0UL;
- parseState->lineNumber = 1UL;
- parseState->lineStartIndex = 0UL;
- parseState->prev_atIndex = 0UL;
- parseState->prev_lineNumber = 1UL;
- parseState->prev_lineStartIndex = 0UL;
- parseState->error = NULL;
- parseState->errorIsPrev = 0;
- parseState->mutableCollections = (mutableCollections == NO) ? NO : YES;
-
- unsigned char stackTokenBuffer[JK_TOKENBUFFER_SIZE] JK_ALIGNED(64);
- jk_managedBuffer_setToStackBuffer(&parseState->token.tokenBuffer, stackTokenBuffer, sizeof(stackTokenBuffer));
-
- void *stackObjects [JK_STACK_OBJS] JK_ALIGNED(64);
- void *stackKeys [JK_STACK_OBJS] JK_ALIGNED(64);
- CFHashCode stackCFHashes[JK_STACK_OBJS] JK_ALIGNED(64);
- jk_objectStack_setToStackBuffer(&parseState->objectStack, stackObjects, stackKeys, stackCFHashes, JK_STACK_OBJS);
-
- id parsedJSON = json_parse_it(parseState);
-
- if((error != NULL) && (parseState->error != NULL)) { *error = parseState->error; }
-
- jk_managedBuffer_release(&parseState->token.tokenBuffer);
- jk_objectStack_release(&parseState->objectStack);
-
- parseState->stringBuffer.bytes.ptr = NULL;
- parseState->stringBuffer.bytes.length = 0UL;
- parseState->atIndex = 0UL;
- parseState->lineNumber = 1UL;
- parseState->lineStartIndex = 0UL;
- parseState->prev_atIndex = 0UL;
- parseState->prev_lineNumber = 1UL;
- parseState->prev_lineStartIndex = 0UL;
- parseState->error = NULL;
- parseState->errorIsPrev = 0;
- parseState->mutableCollections = NO;
-
- return(parsedJSON);
-}
-
-////////////
-#pragma mark Deprecated as of v1.4
-////////////
-
-// Deprecated in JSONKit v1.4. Use objectWithUTF8String:length: instead.
-- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length
-{
- return([self objectWithUTF8String:string length:length error:NULL]);
-}
-
-// Deprecated in JSONKit v1.4. Use objectWithUTF8String:length:error: instead.
-- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error
-{
- return([self objectWithUTF8String:string length:length error:error]);
-}
-
-// Deprecated in JSONKit v1.4. Use objectWithData: instead.
-- (id)parseJSONData:(NSData *)jsonData
-{
- return([self objectWithData:jsonData error:NULL]);
-}
-
-// Deprecated in JSONKit v1.4. Use objectWithData:error: instead.
-- (id)parseJSONData:(NSData *)jsonData error:(NSError **)error
-{
- return([self objectWithData:jsonData error:error]);
-}
-
-////////////
-#pragma mark Methods that return immutable collection objects
-////////////
-
-- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length
-{
- return([self objectWithUTF8String:string length:length error:NULL]);
-}
-
-- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error
-{
- if(parseState == NULL) { [NSException raise:NSInternalInconsistencyException format:@"parseState is NULL."]; }
- if(string == NULL) { [NSException raise:NSInvalidArgumentException format:@"The string argument is NULL."]; }
-
- return(_JKParseUTF8String(parseState, NO, string, (size_t)length, error));
-}
-
-- (id)objectWithData:(NSData *)jsonData
-{
- return([self objectWithData:jsonData error:NULL]);
-}
-
-- (id)objectWithData:(NSData *)jsonData error:(NSError **)error
-{
- if(jsonData == NULL) { [NSException raise:NSInvalidArgumentException format:@"The jsonData argument is NULL."]; }
- return([self objectWithUTF8String:(const unsigned char *)[jsonData bytes] length:[jsonData length] error:error]);
-}
-
-////////////
-#pragma mark Methods that return mutable collection objects
-////////////
-
-- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length
-{
- return([self mutableObjectWithUTF8String:string length:length error:NULL]);
-}
-
-- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error
-{
- if(parseState == NULL) { [NSException raise:NSInternalInconsistencyException format:@"parseState is NULL."]; }
- if(string == NULL) { [NSException raise:NSInvalidArgumentException format:@"The string argument is NULL."]; }
-
- return(_JKParseUTF8String(parseState, YES, string, (size_t)length, error));
-}
-
-- (id)mutableObjectWithData:(NSData *)jsonData
-{
- return([self mutableObjectWithData:jsonData error:NULL]);
-}
-
-- (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error
-{
- if(jsonData == NULL) { [NSException raise:NSInvalidArgumentException format:@"The jsonData argument is NULL."]; }
- return([self mutableObjectWithUTF8String:(const unsigned char *)[jsonData bytes] length:[jsonData length] error:error]);
-}
-
-@end
-
-/*
- The NSString and NSData convenience methods need a little bit of explanation.
-
- Prior to JSONKit v1.4, the NSString -objectFromJSONStringWithParseOptions:error: method looked like
-
- const unsigned char *utf8String = (const unsigned char *)[self UTF8String];
- if(utf8String == NULL) { return(NULL); }
- size_t utf8Length = strlen((const char *)utf8String);
- return([[JSONDecoder decoderWithParseOptions:parseOptionFlags] parseUTF8String:utf8String length:utf8Length error:error]);
-
- This changed with v1.4 to a more complicated method. The reason for this is to keep the amount of memory that is
- allocated, but not yet freed because it is dependent on the autorelease pool to pop before it can be reclaimed.
-
- In the simpler v1.3 code, this included all the bytes used to store the -UTF8String along with the JSONDecoder and all its overhead.
-
- Now we use an autoreleased CFMutableData that is sized to the UTF8 length of the NSString in question and is used to hold the UTF8
- conversion of said string.
-
- Once parsed, the CFMutableData has its length set to 0. This should, hopefully, allow the CFMutableData to realloc and/or free
- the buffer.
-
- Another change made was a slight modification to JSONDecoder so that most of the cleanup work that was done in -dealloc was moved
- to a private, internal function. These convenience routines keep the pointer to the autoreleased JSONDecoder and calls
- _JSONDecoderCleanup() to early release the decoders resources since we already know that particular decoder is not going to be used
- again.
-
- If everything goes smoothly, this will most likely result in perhaps a few hundred bytes that are allocated but waiting for the
- autorelease pool to pop. This is compared to the thousands and easily hundreds of thousands of bytes that would have been in
- autorelease limbo. It's more complicated for us, but a win for the user.
-
- Autorelease objects are used in case things don't go smoothly. By having them autoreleased, we effectively guarantee that our
- requirement to -release the object is always met, not matter what goes wrong. The downside is having a an object or two in
- autorelease limbo, but we've done our best to minimize that impact, so it all balances out.
- */
-
-@implementation NSString (JSONKitDeserializing)
-
-static id _NSStringObjectFromJSONString(NSString *jsonString, JKParseOptionFlags parseOptionFlags, NSError **error, BOOL mutableCollection) {
- id returnObject = NULL;
- CFMutableDataRef mutableData = NULL;
- JSONDecoder *decoder = NULL;
-
- CFIndex stringLength = CFStringGetLength((CFStringRef)jsonString);
- NSUInteger stringUTF8Length = [jsonString lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
-
- if((mutableData = (CFMutableDataRef)[(id)CFDataCreateMutable(NULL, (NSUInteger)stringUTF8Length) autorelease]) != NULL) {
- UInt8 *utf8String = CFDataGetMutableBytePtr(mutableData);
- CFIndex usedBytes = 0L, convertedCount = 0L;
-
- convertedCount = CFStringGetBytes((CFStringRef)jsonString, CFRangeMake(0L, stringLength), kCFStringEncodingUTF8, '?', NO, utf8String, (NSUInteger)stringUTF8Length, &usedBytes);
- if(JK_EXPECT_F(convertedCount != stringLength) || JK_EXPECT_F(usedBytes < 0L)) { if(error != NULL) { *error = [NSError errorWithDomain:@"JKErrorDomain" code:-1L userInfo:[NSDictionary dictionaryWithObject:@"An error occurred converting the contents of a NSString to UTF8." forKey:NSLocalizedDescriptionKey]]; } goto exitNow; }
-
- if(mutableCollection == NO) { returnObject = [(decoder = [JSONDecoder decoderWithParseOptions:parseOptionFlags]) objectWithUTF8String:(const unsigned char *)utf8String length:(size_t)usedBytes error:error]; }
- else { returnObject = [(decoder = [JSONDecoder decoderWithParseOptions:parseOptionFlags]) mutableObjectWithUTF8String:(const unsigned char *)utf8String length:(size_t)usedBytes error:error]; }
- }
-
-exitNow:
- if(mutableData != NULL) { CFDataSetLength(mutableData, 0L); }
- if(decoder != NULL) { _JSONDecoderCleanup(decoder); }
- return(returnObject);
-}
-
-- (id)objectFromJSONString
-{
- return([self objectFromJSONStringWithParseOptions:JKParseOptionStrict error:NULL]);
-}
-
-- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- return([self objectFromJSONStringWithParseOptions:parseOptionFlags error:NULL]);
-}
-
-- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error
-{
- return(_NSStringObjectFromJSONString(self, parseOptionFlags, error, NO));
-}
-
-
-- (id)mutableObjectFromJSONString
-{
- return([self mutableObjectFromJSONStringWithParseOptions:JKParseOptionStrict error:NULL]);
-}
-
-- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- return([self mutableObjectFromJSONStringWithParseOptions:parseOptionFlags error:NULL]);
-}
-
-- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error
-{
- return(_NSStringObjectFromJSONString(self, parseOptionFlags, error, YES));
-}
-
-@end
-
-@implementation NSData (JSONKitDeserializing)
-
-- (id)objectFromJSONData
-{
- return([self objectFromJSONDataWithParseOptions:JKParseOptionStrict error:NULL]);
-}
-
-- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- return([self objectFromJSONDataWithParseOptions:parseOptionFlags error:NULL]);
-}
-
-- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error
-{
- JSONDecoder *decoder = NULL;
- id returnObject = [(decoder = [JSONDecoder decoderWithParseOptions:parseOptionFlags]) objectWithData:self error:error];
- if(decoder != NULL) { _JSONDecoderCleanup(decoder); }
- return(returnObject);
-}
-
-- (id)mutableObjectFromJSONData
-{
- return([self mutableObjectFromJSONDataWithParseOptions:JKParseOptionStrict error:NULL]);
-}
-
-- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags
-{
- return([self mutableObjectFromJSONDataWithParseOptions:parseOptionFlags error:NULL]);
-}
-
-- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error
-{
- JSONDecoder *decoder = NULL;
- id returnObject = [(decoder = [JSONDecoder decoderWithParseOptions:parseOptionFlags]) mutableObjectWithData:self error:error];
- if(decoder != NULL) { _JSONDecoderCleanup(decoder); }
- return(returnObject);
-}
-
-
-@end
-
-////////////
-#pragma mark -
-#pragma mark Encoding / deserializing functions
-
-static void jk_encode_error(JKEncodeState *encodeState, NSString *format, ...) {
- NSCParameterAssert((encodeState != NULL) && (format != NULL));
-
- va_list varArgsList;
- va_start(varArgsList, format);
- NSString *formatString = [[[NSString alloc] initWithFormat:format arguments:varArgsList] autorelease];
- va_end(varArgsList);
-
- if(encodeState->error == NULL) {
- encodeState->error = [NSError errorWithDomain:@"JKErrorDomain" code:-1L userInfo:
- [NSDictionary dictionaryWithObjectsAndKeys:
- formatString, NSLocalizedDescriptionKey,
- NULL]];
- }
-}
-
-JK_STATIC_INLINE void jk_encode_updateCache(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object) {
- NSCParameterAssert(encodeState != NULL);
- if(JK_EXPECT_T(cacheSlot != NULL)) {
- NSCParameterAssert((object != NULL) && (startingAtIndex <= encodeState->atIndex));
- cacheSlot->object = object;
- cacheSlot->offset = startingAtIndex;
- cacheSlot->length = (size_t)(encodeState->atIndex - startingAtIndex);
- }
-}
-
-static int jk_encode_printf(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format, ...) {
- va_list varArgsList, varArgsListCopy;
- va_start(varArgsList, format);
- va_copy(varArgsListCopy, varArgsList);
-
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && (startingAtIndex <= encodeState->atIndex) && (format != NULL));
-
- ssize_t formattedStringLength = 0L;
- int returnValue = 0;
-
- if(JK_EXPECT_T((formattedStringLength = vsnprintf((char *)&encodeState->stringBuffer.bytes.ptr[encodeState->atIndex], (encodeState->stringBuffer.bytes.length - encodeState->atIndex), format, varArgsList)) >= (ssize_t)(encodeState->stringBuffer.bytes.length - encodeState->atIndex))) {
- NSCParameterAssert(((encodeState->atIndex + (formattedStringLength * 2UL) + 256UL) > encodeState->stringBuffer.bytes.length));
- if(JK_EXPECT_F(((encodeState->atIndex + (formattedStringLength * 2UL) + 256UL) > encodeState->stringBuffer.bytes.length)) && JK_EXPECT_F((jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + (formattedStringLength * 2UL)+ 4096UL) == NULL))) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); returnValue = 1; goto exitNow; }
- if(JK_EXPECT_F((formattedStringLength = vsnprintf((char *)&encodeState->stringBuffer.bytes.ptr[encodeState->atIndex], (encodeState->stringBuffer.bytes.length - encodeState->atIndex), format, varArgsListCopy)) >= (ssize_t)(encodeState->stringBuffer.bytes.length - encodeState->atIndex))) { jk_encode_error(encodeState, @"vsnprintf failed unexpectedly."); returnValue = 1; goto exitNow; }
- }
-
-exitNow:
- va_end(varArgsList);
- va_end(varArgsListCopy);
- if(JK_EXPECT_T(returnValue == 0)) { encodeState->atIndex += formattedStringLength; jk_encode_updateCache(encodeState, cacheSlot, startingAtIndex, object); }
- return(returnValue);
-}
-
-static int jk_encode_write(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format) {
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && (startingAtIndex <= encodeState->atIndex) && (format != NULL));
- if(JK_EXPECT_F(((encodeState->atIndex + strlen(format) + 256UL) > encodeState->stringBuffer.bytes.length)) && JK_EXPECT_F((jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + strlen(format) + 1024UL) == NULL))) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
-
- size_t formatIdx = 0UL;
- for(formatIdx = 0UL; format[formatIdx] != 0; formatIdx++) { NSCParameterAssert(encodeState->atIndex < encodeState->stringBuffer.bytes.length); encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = format[formatIdx]; }
- jk_encode_updateCache(encodeState, cacheSlot, startingAtIndex, object);
- return(0);
-}
-
-static int jk_encode_writePrettyPrintWhiteSpace(JKEncodeState *encodeState) {
- NSCParameterAssert((encodeState != NULL) && ((encodeState->serializeOptionFlags & JKSerializeOptionPretty) != 0UL));
- if(JK_EXPECT_F((encodeState->atIndex + ((encodeState->depth + 1UL) * 2UL) + 16UL) > encodeState->stringBuffer.bytes.length) && JK_EXPECT_T(jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + ((encodeState->depth + 1UL) * 2UL) + 4096UL) == NULL)) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
- encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\n';
- size_t depthWhiteSpace = 0UL;
- for(depthWhiteSpace = 0UL; depthWhiteSpace < (encodeState->depth * 2UL); depthWhiteSpace++) { NSCParameterAssert(encodeState->atIndex < encodeState->stringBuffer.bytes.length); encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = ' '; }
- return(0);
-}
-
-static int jk_encode_write1slow(JKEncodeState *encodeState, ssize_t depthChange, const char *format) {
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && (format != NULL) && ((depthChange >= -1L) && (depthChange <= 1L)) && ((encodeState->depth == 0UL) ? (depthChange >= 0L) : 1) && ((encodeState->serializeOptionFlags & JKSerializeOptionPretty) != 0UL));
- if(JK_EXPECT_F((encodeState->atIndex + ((encodeState->depth + 1UL) * 2UL) + 16UL) > encodeState->stringBuffer.bytes.length) && JK_EXPECT_F(jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + ((encodeState->depth + 1UL) * 2UL) + 4096UL) == NULL)) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
- encodeState->depth += depthChange;
- if(JK_EXPECT_T(format[0] == ':')) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = format[0]; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = ' '; }
- else {
- if(JK_EXPECT_F(depthChange == -1L)) { if(JK_EXPECT_F(jk_encode_writePrettyPrintWhiteSpace(encodeState))) { return(1); } }
- encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = format[0];
- if(JK_EXPECT_T(depthChange != -1L)) { if(JK_EXPECT_F(jk_encode_writePrettyPrintWhiteSpace(encodeState))) { return(1); } }
- }
- NSCParameterAssert(encodeState->atIndex < encodeState->stringBuffer.bytes.length);
- return(0);
-}
-
-static int jk_encode_write1fast(JKEncodeState *encodeState, ssize_t depthChange JK_UNUSED_ARG, const char *format) {
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && ((encodeState->serializeOptionFlags & JKSerializeOptionPretty) == 0UL));
- if(JK_EXPECT_T((encodeState->atIndex + 4UL) < encodeState->stringBuffer.bytes.length)) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = format[0]; }
- else { return(jk_encode_write(encodeState, NULL, 0UL, NULL, format)); }
- return(0);
-}
-
-static int jk_encode_writen(JKEncodeState *encodeState, JKEncodeCache *cacheSlot, size_t startingAtIndex, id object, const char *format, size_t length) {
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && (startingAtIndex <= encodeState->atIndex));
- if(JK_EXPECT_F((encodeState->stringBuffer.bytes.length - encodeState->atIndex) < (length + 4UL))) { if(jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + 4096UL + length) == NULL) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); } }
- memcpy(encodeState->stringBuffer.bytes.ptr + encodeState->atIndex, format, length);
- encodeState->atIndex += length;
- jk_encode_updateCache(encodeState, cacheSlot, startingAtIndex, object);
- return(0);
-}
-
-JK_STATIC_INLINE JKHash jk_encode_object_hash(void *objectPtr) {
- return( ( (((JKHash)objectPtr) >> 21) ^ (((JKHash)objectPtr) >> 9) ) + (((JKHash)objectPtr) >> 4) );
-}
-
-static int jk_encode_add_atom_to_buffer(JKEncodeState *encodeState, void *objectPtr) {
- NSCParameterAssert((encodeState != NULL) && (encodeState->atIndex < encodeState->stringBuffer.bytes.length) && (objectPtr != NULL));
-
- id object = (id)objectPtr, encodeCacheObject = object;
- int isClass = JKClassUnknown;
- size_t startingAtIndex = encodeState->atIndex;
-
- JKHash objectHash = jk_encode_object_hash(objectPtr);
- JKEncodeCache *cacheSlot = &encodeState->cache[objectHash % JK_ENCODE_CACHE_SLOTS];
-
- if(JK_EXPECT_T(cacheSlot->object == object)) {
- NSCParameterAssert((cacheSlot->object != NULL) &&
- (cacheSlot->offset < encodeState->atIndex) && ((cacheSlot->offset + cacheSlot->length) < encodeState->atIndex) &&
- (cacheSlot->offset < encodeState->stringBuffer.bytes.length) && ((cacheSlot->offset + cacheSlot->length) < encodeState->stringBuffer.bytes.length) &&
- ((encodeState->stringBuffer.bytes.ptr + encodeState->atIndex) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + cacheSlot->offset) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + cacheSlot->offset + cacheSlot->length) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)));
- if(JK_EXPECT_F(((encodeState->atIndex + cacheSlot->length + 256UL) > encodeState->stringBuffer.bytes.length)) && JK_EXPECT_F((jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + cacheSlot->length + 1024UL) == NULL))) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
- NSCParameterAssert(((encodeState->atIndex + cacheSlot->length) < encodeState->stringBuffer.bytes.length) &&
- ((encodeState->stringBuffer.bytes.ptr + encodeState->atIndex) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + encodeState->atIndex + cacheSlot->length) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + cacheSlot->offset) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + cacheSlot->offset + cacheSlot->length) < (encodeState->stringBuffer.bytes.ptr + encodeState->stringBuffer.bytes.length)) &&
- ((encodeState->stringBuffer.bytes.ptr + cacheSlot->offset + cacheSlot->length) < (encodeState->stringBuffer.bytes.ptr + encodeState->atIndex)));
- memcpy(encodeState->stringBuffer.bytes.ptr + encodeState->atIndex, encodeState->stringBuffer.bytes.ptr + cacheSlot->offset, cacheSlot->length);
- encodeState->atIndex += cacheSlot->length;
- return(0);
- }
-
- // When we encounter a class that we do not handle, and we have either a delegate or block that the user supplied to format unsupported classes,
- // we "re-run" the object check. However, we re-run the object check exactly ONCE. If the user supplies an object that isn't one of the
- // supported classes, we fail the second time (i.e., double fault error).
- BOOL rerunningAfterClassFormatter = NO;
- rerunAfterClassFormatter:;
-
- // XXX XXX XXX XXX
- //
- // We need to work around a bug in 10.7, which breaks ABI compatibility with Objective-C going back not just to 10.0, but OpenStep and even NextStep.
- //
- // It has long been documented that "the very first thing that a pointer to an Objective-C object "points to" is a pointer to that objects class".
- //
- // This is euphemistically called "tagged pointers". There are a number of highly technical problems with this, most involving long passages from
- // the C standard(s). In short, one can make a strong case, couched from the perspective of the C standard(s), that that 10.7 "tagged pointers" are
- // fundamentally Wrong and Broken, and should have never been implemented. Assuming those points are glossed over, because the change is very clearly
- // breaking ABI compatibility, this should have resulted in a minimum of a "minimum version required" bump in various shared libraries to prevent
- // causes code that used to work just fine to suddenly break without warning.
- //
- // In fact, the C standard says that the hack below is "undefined behavior"- there is no requirement that the 10.7 tagged pointer hack of setting the
- // "lower, unused bits" must be preserved when casting the result to an integer type, but this "works" because for most architectures
- // `sizeof(long) == sizeof(void *)` and the compiler uses the same representation for both. (note: this is informal, not meant to be
- // normative or pedantically correct).
- //
- // In other words, while this "works" for now, technically the compiler is not obligated to do "what we want", and a later version of the compiler
- // is not required in any way to produce the same results or behavior that earlier versions of the compiler did for the statement below.
- //
- // Fan-fucking-tastic.
- //
- // Why not just use `object_getClass()`? Because `object->isa` reduces to (typically) a *single* instruction. Calling `object_getClass()` requires
- // that the compiler potentially spill registers, establish a function call frame / environment, and finally execute a "jump subroutine" instruction.
- // Then, the called subroutine must spend half a dozen instructions in its prolog, however many instructions doing whatever it does, then half a dozen
- // instructions in its prolog. One instruction compared to dozens, maybe a hundred instructions.
- //
- // Yes, that's one to two orders of magnitude difference. Which is compelling in its own right. When going for performance, you're often happy with
- // gains in the two to three percent range.
- //
- // XXX XXX XXX XXX
-
-
- BOOL workAroundMacOSXABIBreakingBug = (JK_EXPECT_F(((NSUInteger)object) & 0x1)) ? YES : NO;
- void *objectISA = (JK_EXPECT_F(workAroundMacOSXABIBreakingBug)) ? NULL : *((void **)objectPtr);
- if(JK_EXPECT_F(workAroundMacOSXABIBreakingBug)) { goto slowClassLookup; }
-
- if(JK_EXPECT_T(objectISA == encodeState->fastClassLookup.stringClass)) { isClass = JKClassString; }
- else if(JK_EXPECT_T(objectISA == encodeState->fastClassLookup.numberClass)) { isClass = JKClassNumber; }
- else if(JK_EXPECT_T(objectISA == encodeState->fastClassLookup.dictionaryClass)) { isClass = JKClassDictionary; }
- else if(JK_EXPECT_T(objectISA == encodeState->fastClassLookup.arrayClass)) { isClass = JKClassArray; }
- else if(JK_EXPECT_T(objectISA == encodeState->fastClassLookup.nullClass)) { isClass = JKClassNull; }
- else {
- slowClassLookup:
- if(JK_EXPECT_T([object isKindOfClass:[NSString class]])) { if(workAroundMacOSXABIBreakingBug == NO) { encodeState->fastClassLookup.stringClass = objectISA; } isClass = JKClassString; }
- else if(JK_EXPECT_T([object isKindOfClass:[NSNumber class]])) { if(workAroundMacOSXABIBreakingBug == NO) { encodeState->fastClassLookup.numberClass = objectISA; } isClass = JKClassNumber; }
- else if(JK_EXPECT_T([object isKindOfClass:[NSDictionary class]])) { if(workAroundMacOSXABIBreakingBug == NO) { encodeState->fastClassLookup.dictionaryClass = objectISA; } isClass = JKClassDictionary; }
- else if(JK_EXPECT_T([object isKindOfClass:[NSArray class]])) { if(workAroundMacOSXABIBreakingBug == NO) { encodeState->fastClassLookup.arrayClass = objectISA; } isClass = JKClassArray; }
- else if(JK_EXPECT_T([object isKindOfClass:[NSNull class]])) { if(workAroundMacOSXABIBreakingBug == NO) { encodeState->fastClassLookup.nullClass = objectISA; } isClass = JKClassNull; }
- else {
- if((rerunningAfterClassFormatter == NO) && (
-#ifdef __BLOCKS__
- ((encodeState->classFormatterBlock) && ((object = encodeState->classFormatterBlock(object)) != NULL)) ||
-#endif
- ((encodeState->classFormatterIMP) && ((object = encodeState->classFormatterIMP(encodeState->classFormatterDelegate, encodeState->classFormatterSelector, object)) != NULL)) )) { rerunningAfterClassFormatter = YES; goto rerunAfterClassFormatter; }
-
- if(rerunningAfterClassFormatter == NO) { jk_encode_error(encodeState, @"Unable to serialize object class %@.", NSStringFromClass([encodeCacheObject class])); return(1); }
- else { jk_encode_error(encodeState, @"Unable to serialize object class %@ that was returned by the unsupported class formatter. Original object class was %@.", (object == NULL) ? @"NULL" : NSStringFromClass([object class]), NSStringFromClass([encodeCacheObject class])); return(1); }
- }
- }
-
- // This is here for the benefit of the optimizer. It allows the optimizer to do loop invariant code motion for the JKClassArray
- // and JKClassDictionary cases when printing simple, single characters via jk_encode_write(), which is actually a macro:
- // #define jk_encode_write1(es, dc, f) (_jk_encode_prettyPrint ? jk_encode_write1slow(es, dc, f) : jk_encode_write1fast(es, dc, f))
- int _jk_encode_prettyPrint = JK_EXPECT_T((encodeState->serializeOptionFlags & JKSerializeOptionPretty) == 0) ? 0 : 1;
-
- switch(isClass) {
- case JKClassString:
- {
- {
- const unsigned char *cStringPtr = (const unsigned char *)CFStringGetCStringPtr((CFStringRef)object, kCFStringEncodingMacRoman);
- if(cStringPtr != NULL) {
- const unsigned char *utf8String = cStringPtr;
- size_t utf8Idx = 0UL;
-
- CFIndex stringLength = CFStringGetLength((CFStringRef)object);
- if(JK_EXPECT_F(((encodeState->atIndex + (stringLength * 2UL) + 256UL) > encodeState->stringBuffer.bytes.length)) && JK_EXPECT_F((jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + (stringLength * 2UL) + 1024UL) == NULL))) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
-
- if(JK_EXPECT_T((encodeState->encodeOption & JKEncodeOptionStringObjTrimQuotes) == 0UL)) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\"'; }
- for(utf8Idx = 0UL; utf8String[utf8Idx] != 0U; utf8Idx++) {
- NSCParameterAssert(((&encodeState->stringBuffer.bytes.ptr[encodeState->atIndex]) - encodeState->stringBuffer.bytes.ptr) < (ssize_t)encodeState->stringBuffer.bytes.length);
- NSCParameterAssert(encodeState->atIndex < encodeState->stringBuffer.bytes.length);
- if(JK_EXPECT_F(utf8String[utf8Idx] >= 0x80U)) { encodeState->atIndex = startingAtIndex; goto slowUTF8Path; }
- if(JK_EXPECT_F(utf8String[utf8Idx] < 0x20U)) {
- switch(utf8String[utf8Idx]) {
- case '\b': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'b'; break;
- case '\f': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'f'; break;
- case '\n': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'n'; break;
- case '\r': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'r'; break;
- case '\t': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 't'; break;
- default: if(JK_EXPECT_F(jk_encode_printf(encodeState, NULL, 0UL, NULL, "\\u%4.4x", utf8String[utf8Idx]))) { return(1); } break;
- }
- } else {
- if(JK_EXPECT_F(utf8String[utf8Idx] == '\"') || JK_EXPECT_F(utf8String[utf8Idx] == '\\') || (JK_EXPECT_F(encodeState->serializeOptionFlags & JKSerializeOptionEscapeForwardSlashes) && JK_EXPECT_F(utf8String[utf8Idx] == '/'))) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; }
- encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = utf8String[utf8Idx];
- }
- }
- NSCParameterAssert((encodeState->atIndex + 1UL) < encodeState->stringBuffer.bytes.length);
- if(JK_EXPECT_T((encodeState->encodeOption & JKEncodeOptionStringObjTrimQuotes) == 0UL)) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\"'; }
- jk_encode_updateCache(encodeState, cacheSlot, startingAtIndex, encodeCacheObject);
- return(0);
- }
- }
-
- slowUTF8Path:
- {
- CFIndex stringLength = CFStringGetLength((CFStringRef)object);
- CFIndex maxStringUTF8Length = CFStringGetMaximumSizeForEncoding(stringLength, kCFStringEncodingUTF8) + 32L;
-
- if(JK_EXPECT_F((size_t)maxStringUTF8Length > encodeState->utf8ConversionBuffer.bytes.length) && JK_EXPECT_F(jk_managedBuffer_resize(&encodeState->utf8ConversionBuffer, maxStringUTF8Length + 1024UL) == NULL)) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
-
- CFIndex usedBytes = 0L, convertedCount = 0L;
- convertedCount = CFStringGetBytes((CFStringRef)object, CFRangeMake(0L, stringLength), kCFStringEncodingUTF8, '?', NO, encodeState->utf8ConversionBuffer.bytes.ptr, encodeState->utf8ConversionBuffer.bytes.length - 16L, &usedBytes);
- if(JK_EXPECT_F(convertedCount != stringLength) || JK_EXPECT_F(usedBytes < 0L)) { jk_encode_error(encodeState, @"An error occurred converting the contents of a NSString to UTF8."); return(1); }
-
- if(JK_EXPECT_F((encodeState->atIndex + (maxStringUTF8Length * 2UL) + 256UL) > encodeState->stringBuffer.bytes.length) && JK_EXPECT_F(jk_managedBuffer_resize(&encodeState->stringBuffer, encodeState->atIndex + (maxStringUTF8Length * 2UL) + 1024UL) == NULL)) { jk_encode_error(encodeState, @"Unable to resize temporary buffer."); return(1); }
-
- const unsigned char *utf8String = encodeState->utf8ConversionBuffer.bytes.ptr;
-
- size_t utf8Idx = 0UL;
- if(JK_EXPECT_T((encodeState->encodeOption & JKEncodeOptionStringObjTrimQuotes) == 0UL)) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\"'; }
- for(utf8Idx = 0UL; utf8Idx < (size_t)usedBytes; utf8Idx++) {
- NSCParameterAssert(((&encodeState->stringBuffer.bytes.ptr[encodeState->atIndex]) - encodeState->stringBuffer.bytes.ptr) < (ssize_t)encodeState->stringBuffer.bytes.length);
- NSCParameterAssert(encodeState->atIndex < encodeState->stringBuffer.bytes.length);
- NSCParameterAssert((CFIndex)utf8Idx < usedBytes);
- if(JK_EXPECT_F(utf8String[utf8Idx] < 0x20U)) {
- switch(utf8String[utf8Idx]) {
- case '\b': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'b'; break;
- case '\f': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'f'; break;
- case '\n': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'n'; break;
- case '\r': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 'r'; break;
- case '\t': encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = 't'; break;
- default: if(JK_EXPECT_F(jk_encode_printf(encodeState, NULL, 0UL, NULL, "\\u%4.4x", utf8String[utf8Idx]))) { return(1); } break;
- }
- } else {
- if(JK_EXPECT_F(utf8String[utf8Idx] >= 0x80U) && (encodeState->serializeOptionFlags & JKSerializeOptionEscapeUnicode)) {
- const unsigned char *nextValidCharacter = NULL;
- UTF32 u32ch = 0U;
- ConversionResult result;
-
- if(JK_EXPECT_F((result = ConvertSingleCodePointInUTF8(&utf8String[utf8Idx], &utf8String[usedBytes], (UTF8 const **)&nextValidCharacter, &u32ch)) != conversionOK)) { jk_encode_error(encodeState, @"Error converting UTF8."); return(1); }
- else {
- utf8Idx = (nextValidCharacter - utf8String) - 1UL;
- if(JK_EXPECT_T(u32ch <= 0xffffU)) { if(JK_EXPECT_F(jk_encode_printf(encodeState, NULL, 0UL, NULL, "\\u%4.4x", u32ch))) { return(1); } }
- else { if(JK_EXPECT_F(jk_encode_printf(encodeState, NULL, 0UL, NULL, "\\u%4.4x\\u%4.4x", (0xd7c0U + (u32ch >> 10)), (0xdc00U + (u32ch & 0x3ffU))))) { return(1); } }
- }
- } else {
- if(JK_EXPECT_F(utf8String[utf8Idx] == '\"') || JK_EXPECT_F(utf8String[utf8Idx] == '\\') || (JK_EXPECT_F(encodeState->serializeOptionFlags & JKSerializeOptionEscapeForwardSlashes) && JK_EXPECT_F(utf8String[utf8Idx] == '/'))) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\\'; }
- encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = utf8String[utf8Idx];
- }
- }
- }
- NSCParameterAssert((encodeState->atIndex + 1UL) < encodeState->stringBuffer.bytes.length);
- if(JK_EXPECT_T((encodeState->encodeOption & JKEncodeOptionStringObjTrimQuotes) == 0UL)) { encodeState->stringBuffer.bytes.ptr[encodeState->atIndex++] = '\"'; }
- jk_encode_updateCache(encodeState, cacheSlot, startingAtIndex, encodeCacheObject);
- return(0);
- }
- }
- break;
-
- case JKClassNumber:
- {
- if(object == (id)kCFBooleanTrue) { return(jk_encode_writen(encodeState, cacheSlot, startingAtIndex, encodeCacheObject, "true", 4UL)); }
- else if(object == (id)kCFBooleanFalse) { return(jk_encode_writen(encodeState, cacheSlot, startingAtIndex, encodeCacheObject, "false", 5UL)); }
-
- const char *objCType = [object objCType];
- char anum[256], *aptr = &anum[255];
- int isNegative = 0;
- unsigned long long ullv;
- long long llv;
-
- if(JK_EXPECT_F(objCType == NULL) || JK_EXPECT_F(objCType[0] == 0) || JK_EXPECT_F(objCType[1] != 0)) { jk_encode_error(encodeState, @"NSNumber conversion error, unknown type. Type: '%s'", (objCType == NULL) ? "" : objCType); return(1); }
-
- switch(objCType[0]) {
- case 'c': case 'i': case 's': case 'l': case 'q':
- if(JK_EXPECT_T(CFNumberGetValue((CFNumberRef)object, kCFNumberLongLongType, &llv))) {
- if(llv < 0LL) { ullv = -llv; isNegative = 1; } else { ullv = llv; isNegative = 0; }
- goto convertNumber;
- } else { jk_encode_error(encodeState, @"Unable to get scalar value from number object."); return(1); }
- break;
- case 'C': case 'I': case 'S': case 'L': case 'Q': case 'B':
- if(JK_EXPECT_T(CFNumberGetValue((CFNumberRef)object, kCFNumberLongLongType, &ullv))) {
- convertNumber:
- if(JK_EXPECT_F(ullv < 10ULL)) { *--aptr = ullv + '0'; } else { while(JK_EXPECT_T(ullv > 0ULL)) { *--aptr = (ullv % 10ULL) + '0'; ullv /= 10ULL; NSCParameterAssert(aptr > anum); } }
- if(isNegative) { *--aptr = '-'; }
- NSCParameterAssert(aptr > anum);
- return(jk_encode_writen(encodeState, cacheSlot, startingAtIndex, encodeCacheObject, aptr, &anum[255] - aptr));
- } else { jk_encode_error(encodeState, @"Unable to get scalar value from number object."); return(1); }
- break;
- case 'f': case 'd':
- {
- double dv;
- if(JK_EXPECT_T(CFNumberGetValue((CFNumberRef)object, kCFNumberDoubleType, &dv))) {
- if(JK_EXPECT_F(!isfinite(dv))) { jk_encode_error(encodeState, @"Floating point values must be finite. JSON does not support NaN or Infinity."); return(1); }
- return(jk_encode_printf(encodeState, cacheSlot, startingAtIndex, encodeCacheObject, "%.17g", dv));
- } else { jk_encode_error(encodeState, @"Unable to get floating point value from number object."); return(1); }
- }
- break;
- default: jk_encode_error(encodeState, @"NSNumber conversion error, unknown type. Type: '%c' / 0x%2.2x", objCType[0], objCType[0]); return(1); break;
- }
- }
- break;
-
- case JKClassArray:
- {
- int printComma = 0;
- CFIndex arrayCount = CFArrayGetCount((CFArrayRef)object), idx = 0L;
- if(JK_EXPECT_F(jk_encode_write1(encodeState, 1L, "["))) { return(1); }
- if(JK_EXPECT_F(arrayCount > 1020L)) {
- for(id arrayObject in object) { if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } } printComma = 1; if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, arrayObject))) { return(1); } }
- } else {
- void *objects[1024];
- CFArrayGetValues((CFArrayRef)object, CFRangeMake(0L, arrayCount), (const void **)objects);
- for(idx = 0L; idx < arrayCount; idx++) { if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } } printComma = 1; if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, objects[idx]))) { return(1); } }
- }
- return(jk_encode_write1(encodeState, -1L, "]"));
- }
- break;
-
- case JKClassDictionary:
- {
- int printComma = 0;
- CFIndex dictionaryCount = CFDictionaryGetCount((CFDictionaryRef)object), idx = 0L;
- id enumerateObject = JK_EXPECT_F(_jk_encode_prettyPrint) ? [[object allKeys] sortedArrayUsingSelector:@selector(compare:)] : object;
-
- if(JK_EXPECT_F(jk_encode_write1(encodeState, 1L, "{"))) { return(1); }
- if(JK_EXPECT_F(_jk_encode_prettyPrint) || JK_EXPECT_F(dictionaryCount > 1020L)) {
- for(id keyObject in enumerateObject) {
- if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } }
- printComma = 1;
- void *keyObjectISA = *((void **)keyObject);
- if(JK_EXPECT_F((keyObjectISA != encodeState->fastClassLookup.stringClass)) && JK_EXPECT_F(([keyObject isKindOfClass:[NSString class]] == NO))) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); }
- if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, keyObject))) { return(1); }
- if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ":"))) { return(1); }
- if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, (void *)CFDictionaryGetValue((CFDictionaryRef)object, keyObject)))) { return(1); }
- }
- } else {
- void *keys[1024], *objects[1024];
- CFDictionaryGetKeysAndValues((CFDictionaryRef)object, (const void **)keys, (const void **)objects);
- for(idx = 0L; idx < dictionaryCount; idx++) {
- if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } }
- printComma = 1;
- void *keyObjectISA = *((void **)keys[idx]);
- if(JK_EXPECT_F(keyObjectISA != encodeState->fastClassLookup.stringClass) && JK_EXPECT_F([(id)keys[idx] isKindOfClass:[NSString class]] == NO)) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); }
- if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, keys[idx]))) { return(1); }
- if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ":"))) { return(1); }
- if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, objects[idx]))) { return(1); }
- }
- }
- return(jk_encode_write1(encodeState, -1L, "}"));
- }
- break;
-
- case JKClassNull: return(jk_encode_writen(encodeState, cacheSlot, startingAtIndex, encodeCacheObject, "null", 4UL)); break;
-
- default: jk_encode_error(encodeState, @"Unable to serialize object class %@.", NSStringFromClass([object class])); return(1); break;
- }
-
- return(0);
-}
-
-
-@implementation JKSerializer
-
-+ (id)serializeObject:(id)object options:(JKSerializeOptionFlags)optionFlags encodeOption:(JKEncodeOptionType)encodeOption block:(JKSERIALIZER_BLOCKS_PROTO)block delegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
- return([[[[self alloc] init] autorelease] serializeObject:object options:optionFlags encodeOption:encodeOption block:block delegate:delegate selector:selector error:error]);
-}
-
-- (id)serializeObject:(id)object options:(JKSerializeOptionFlags)optionFlags encodeOption:(JKEncodeOptionType)encodeOption block:(JKSERIALIZER_BLOCKS_PROTO)block delegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
-#ifndef __BLOCKS__
-#pragma unused(block)
-#endif
- NSParameterAssert((object != NULL) && (encodeState == NULL) && ((delegate != NULL) ? (block == NULL) : 1) && ((block != NULL) ? (delegate == NULL) : 1) &&
- (((encodeOption & JKEncodeOptionCollectionObj) != 0UL) ? (((encodeOption & JKEncodeOptionStringObj) == 0UL) && ((encodeOption & JKEncodeOptionStringObjTrimQuotes) == 0UL)) : 1) &&
- (((encodeOption & JKEncodeOptionStringObj) != 0UL) ? ((encodeOption & JKEncodeOptionCollectionObj) == 0UL) : 1));
-
- id returnObject = NULL;
-
- if(encodeState != NULL) { [self releaseState]; }
- if((encodeState = (struct JKEncodeState *)calloc(1UL, sizeof(JKEncodeState))) == NULL) { [NSException raise:NSMallocException format:@"Unable to allocate state structure."]; return(NULL); }
-
- if((error != NULL) && (*error != NULL)) { *error = NULL; }
-
- if(delegate != NULL) {
- if(selector == NULL) { [NSException raise:NSInvalidArgumentException format:@"The delegate argument is not NULL, but the selector argument is NULL."]; }
- if([delegate respondsToSelector:selector] == NO) { [NSException raise:NSInvalidArgumentException format:@"The serializeUnsupportedClassesUsingDelegate: delegate does not respond to the selector argument."]; }
- encodeState->classFormatterDelegate = delegate;
- encodeState->classFormatterSelector = selector;
- encodeState->classFormatterIMP = (JKClassFormatterIMP)[delegate methodForSelector:selector];
- NSCParameterAssert(encodeState->classFormatterIMP != NULL);
- }
-
-#ifdef __BLOCKS__
- encodeState->classFormatterBlock = block;
-#endif
- encodeState->serializeOptionFlags = optionFlags;
- encodeState->encodeOption = encodeOption;
- encodeState->stringBuffer.roundSizeUpToMultipleOf = (1024UL * 32UL);
- encodeState->utf8ConversionBuffer.roundSizeUpToMultipleOf = 4096UL;
-
- unsigned char stackJSONBuffer[JK_JSONBUFFER_SIZE] JK_ALIGNED(64);
- jk_managedBuffer_setToStackBuffer(&encodeState->stringBuffer, stackJSONBuffer, sizeof(stackJSONBuffer));
-
- unsigned char stackUTF8Buffer[JK_UTF8BUFFER_SIZE] JK_ALIGNED(64);
- jk_managedBuffer_setToStackBuffer(&encodeState->utf8ConversionBuffer, stackUTF8Buffer, sizeof(stackUTF8Buffer));
-
- if(((encodeOption & JKEncodeOptionCollectionObj) != 0UL) && (([object isKindOfClass:[NSArray class]] == NO) && ([object isKindOfClass:[NSDictionary class]] == NO))) { jk_encode_error(encodeState, @"Unable to serialize object class %@, expected a NSArray or NSDictionary.", NSStringFromClass([object class])); goto errorExit; }
- if(((encodeOption & JKEncodeOptionStringObj) != 0UL) && ([object isKindOfClass:[NSString class]] == NO)) { jk_encode_error(encodeState, @"Unable to serialize object class %@, expected a NSString.", NSStringFromClass([object class])); goto errorExit; }
-
- if(jk_encode_add_atom_to_buffer(encodeState, object) == 0) {
- BOOL stackBuffer = ((encodeState->stringBuffer.flags & JKManagedBufferMustFree) == 0UL) ? YES : NO;
-
- if((encodeState->atIndex < 2UL))
- if((stackBuffer == NO) && ((encodeState->stringBuffer.bytes.ptr = (unsigned char *)reallocf(encodeState->stringBuffer.bytes.ptr, encodeState->atIndex + 16UL)) == NULL)) { jk_encode_error(encodeState, @"Unable to realloc buffer"); goto errorExit; }
-
- switch((encodeOption & JKEncodeOptionAsTypeMask)) {
- case JKEncodeOptionAsData:
- if(stackBuffer == YES) { if((returnObject = [(id)CFDataCreate( NULL, encodeState->stringBuffer.bytes.ptr, (CFIndex)encodeState->atIndex) autorelease]) == NULL) { jk_encode_error(encodeState, @"Unable to create NSData object"); } }
- else { if((returnObject = [(id)CFDataCreateWithBytesNoCopy( NULL, encodeState->stringBuffer.bytes.ptr, (CFIndex)encodeState->atIndex, NULL) autorelease]) == NULL) { jk_encode_error(encodeState, @"Unable to create NSData object"); } }
- break;
-
- case JKEncodeOptionAsString:
- if(stackBuffer == YES) { if((returnObject = [(id)CFStringCreateWithBytes( NULL, (const UInt8 *)encodeState->stringBuffer.bytes.ptr, (CFIndex)encodeState->atIndex, kCFStringEncodingUTF8, NO) autorelease]) == NULL) { jk_encode_error(encodeState, @"Unable to create NSString object"); } }
- else { if((returnObject = [(id)CFStringCreateWithBytesNoCopy(NULL, (const UInt8 *)encodeState->stringBuffer.bytes.ptr, (CFIndex)encodeState->atIndex, kCFStringEncodingUTF8, NO, NULL) autorelease]) == NULL) { jk_encode_error(encodeState, @"Unable to create NSString object"); } }
- break;
-
- default: jk_encode_error(encodeState, @"Unknown encode as type."); break;
- }
-
- if((returnObject != NULL) && (stackBuffer == NO)) { encodeState->stringBuffer.flags &= ~JKManagedBufferMustFree; encodeState->stringBuffer.bytes.ptr = NULL; encodeState->stringBuffer.bytes.length = 0UL; }
- }
-
-errorExit:
- if((encodeState != NULL) && (error != NULL) && (encodeState->error != NULL)) { *error = encodeState->error; encodeState->error = NULL; }
- [self releaseState];
-
- return(returnObject);
-}
-
-- (void)releaseState
-{
- if(encodeState != NULL) {
- jk_managedBuffer_release(&encodeState->stringBuffer);
- jk_managedBuffer_release(&encodeState->utf8ConversionBuffer);
- free(encodeState); encodeState = NULL;
- }
-}
-
-- (void)dealloc
-{
- [self releaseState];
- [super dealloc];
-}
-
-@end
-
-@implementation NSString (JSONKitSerializing)
-
-////////////
-#pragma mark Methods for serializing a single NSString.
-////////////
-
-// Useful for those who need to serialize just a NSString. Otherwise you would have to do something like [NSArray arrayWithObject:stringToBeJSONSerialized], serializing the array, and then chopping of the extra ^\[.*\]$ square brackets.
-
-// NSData returning methods...
-
-- (NSData *)JSONData
-{
- return([self JSONDataWithOptions:JKSerializeOptionNone includeQuotes:YES error:NULL]);
-}
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | ((includeQuotes == NO) ? JKEncodeOptionStringObjTrimQuotes : 0UL) | JKEncodeOptionStringObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-// NSString returning methods...
-
-- (NSString *)JSONString
-{
- return([self JSONStringWithOptions:JKSerializeOptionNone includeQuotes:YES error:NULL]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | ((includeQuotes == NO) ? JKEncodeOptionStringObjTrimQuotes : 0UL) | JKEncodeOptionStringObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-@end
-
-@implementation NSArray (JSONKitSerializing)
-
-// NSData returning methods...
-
-- (NSData *)JSONData
-{
- return([JKSerializer serializeObject:self options:JKSerializeOptionNone encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:NULL]);
-}
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:delegate selector:selector error:error]);
-}
-
-// NSString returning methods...
-
-- (NSString *)JSONString
-{
- return([JKSerializer serializeObject:self options:JKSerializeOptionNone encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:NULL]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:delegate selector:selector error:error]);
-}
-
-@end
-
-@implementation NSDictionary (JSONKitSerializing)
-
-// NSData returning methods...
-
-- (NSData *)JSONData
-{
- return([JKSerializer serializeObject:self options:JKSerializeOptionNone encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:NULL]);
-}
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:NULL delegate:delegate selector:selector error:error]);
-}
-
-// NSString returning methods...
-
-- (NSString *)JSONString
-{
- return([JKSerializer serializeObject:self options:JKSerializeOptionNone encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:NULL]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:NULL selector:NULL error:error]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:NULL delegate:delegate selector:selector error:error]);
-}
-
-@end
-
-
-#ifdef __BLOCKS__
-
-@implementation NSArray (JSONKitSerializingBlockAdditions)
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:block delegate:NULL selector:NULL error:error]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:block delegate:NULL selector:NULL error:error]);
-}
-
-@end
-
-@implementation NSDictionary (JSONKitSerializingBlockAdditions)
-
-- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsData | JKEncodeOptionCollectionObj) block:block delegate:NULL selector:NULL error:error]);
-}
-
-- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error
-{
- return([JKSerializer serializeObject:self options:serializeOptions encodeOption:(JKEncodeOptionAsString | JKEncodeOptionCollectionObj) block:block delegate:NULL selector:NULL error:error]);
-}
-
-@end
-
-#endif // __BLOCKS__
-
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/bin/test-JSONKit b/tests/JSONTestSuite/parsers/test_JSONKit/bin/test-JSONKit
deleted file mode 100755
index 568d2a1dd..000000000
Binary files a/tests/JSONTestSuite/parsers/test_JSONKit/bin/test-JSONKit and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.pbxproj
deleted file mode 100644
index 1c92f533f..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,252 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 0388E0421D57F15D00BA0899 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0388E0411D57F15D00BA0899 /* main.m */; };
- 0388E04A1D57F16400BA0899 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 0388E0491D57F16400BA0899 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 0388E03C1D57F15D00BA0899 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 0388E03E1D57F15D00BA0899 /* test-JSONKit */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "test-JSONKit"; sourceTree = BUILT_PRODUCTS_DIR; };
- 0388E0411D57F15D00BA0899 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
- 0388E0481D57F16400BA0899 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = ""; };
- 0388E0491D57F16400BA0899 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 0388E03B1D57F15D00BA0899 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 0388E0351D57F15D00BA0899 = {
- isa = PBXGroup;
- children = (
- 0388E0481D57F16400BA0899 /* JSONKit.h */,
- 0388E0491D57F16400BA0899 /* JSONKit.m */,
- 0388E0401D57F15D00BA0899 /* test-JSONKit */,
- 0388E03F1D57F15D00BA0899 /* Products */,
- );
- sourceTree = "";
- };
- 0388E03F1D57F15D00BA0899 /* Products */ = {
- isa = PBXGroup;
- children = (
- 0388E03E1D57F15D00BA0899 /* test-JSONKit */,
- );
- name = Products;
- sourceTree = "";
- };
- 0388E0401D57F15D00BA0899 /* test-JSONKit */ = {
- isa = PBXGroup;
- children = (
- 0388E0411D57F15D00BA0899 /* main.m */,
- );
- path = "test-JSONKit";
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 0388E03D1D57F15D00BA0899 /* test-JSONKit */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 0388E0451D57F15D00BA0899 /* Build configuration list for PBXNativeTarget "test-JSONKit" */;
- buildPhases = (
- 0388E03A1D57F15D00BA0899 /* Sources */,
- 0388E03B1D57F15D00BA0899 /* Frameworks */,
- 0388E03C1D57F15D00BA0899 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "test-JSONKit";
- productName = "test-JSONKit";
- productReference = 0388E03E1D57F15D00BA0899 /* test-JSONKit */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0388E0361D57F15D00BA0899 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0730;
- ORGANIZATIONNAME = "Nicolas Seriot";
- TargetAttributes = {
- 0388E03D1D57F15D00BA0899 = {
- CreatedOnToolsVersion = 7.3;
- };
- };
- };
- buildConfigurationList = 0388E0391D57F15D00BA0899 /* Build configuration list for PBXProject "test-JSONKit" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 0388E0351D57F15D00BA0899;
- productRefGroup = 0388E03F1D57F15D00BA0899 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 0388E03D1D57F15D00BA0899 /* test-JSONKit */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 0388E03A1D57F15D00BA0899 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 0388E04A1D57F16400BA0899 /* JSONKit.m in Sources */,
- 0388E0421D57F15D00BA0899 /* main.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 0388E0431D57F15D00BA0899 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 0388E0441D57F15D00BA0899 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 0388E0461D57F15D00BA0899 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- 0388E0471D57F15D00BA0899 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 0388E0391D57F15D00BA0899 /* Build configuration list for PBXProject "test-JSONKit" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 0388E0431D57F15D00BA0899 /* Debug */,
- 0388E0441D57F15D00BA0899 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 0388E0451D57F15D00BA0899 /* Build configuration list for PBXNativeTarget "test-JSONKit" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 0388E0461D57F15D00BA0899 /* Debug */,
- 0388E0471D57F15D00BA0899 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0388E0361D57F15D00BA0899 /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 88a89bd32..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 9149b691c..000000000
Binary files a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-JSONKit.xcscheme b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-JSONKit.xcscheme
deleted file mode 100644
index 6c4b602f3..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test-JSONKit.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 5aaf6969e..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test-JSONKit.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 0388E03D1D57F15D00BA0899
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit/main.m b/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit/main.m
deleted file mode 100644
index eb9e94c09..000000000
--- a/tests/JSONTestSuite/parsers/test_JSONKit/test-JSONKit/main.m
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// main.m
-// test-JSONKit
-//
-// Created by nst on 08/08/16.
-// Copyright © 2016 Nicolas Seriot. All rights reserved.
-//
-
-#import
-#import "JSONKit.h" // https://github.com/johnezang/JSONKit
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-typedef enum testStatus {ERROR, PASS, FAIL} TestStatus;
-
-TestStatus test_file(char* filename, int printParsingResults) {
-
- NSString *path = [NSString stringWithCString:filename encoding:NSUTF8StringEncoding];
-
- //NSLog(@"--- %@", path);
-
-// if([path hasSuffix:@"n_structure_100000_opening_arrays.json"]) return ERROR;
-// if([path hasSuffix:@"n_structure_empty.json"]) return ERROR;
-
- NSData *data = [NSData dataWithContentsOfFile:path];
-
- JSONDecoder *decoder = [JSONDecoder decoderWithParseOptions:JKParseOptionNone];
-
- NSError *error = nil;
- id o = [decoder objectWithData:data error:&error];
-
- if (printParsingResults) {
- NSLog(@"--------------------------------\n");
- NSLog(@"-- file: %@\n", path);
- NSLog(@"-- contents: %@\n", data);
- NSLog(@"-- parsed: %d\n", o != NULL);
- if(o != NULL) {
- NSLog(@"-- o: %@", o);
- }
- }
-
- // if (value == NULL) {
- // fprintf(stderr, "Unable to parse data\n");
- // free(file_contents);
- // return 1;
- // }
-
- return o != nil ? PASS : FAIL;
-}
-
-int main(int argc, const char * argv[]) {
- @autoreleasepool {
-
- const char* path = argv[1];
-
- int printParsingResults = 0;
-
- int result = test_file(path, printParsingResults);
-
- if (result == PASS) {
- return 0;
- } else {
- return 1;
- }
-
- }
- return 0;
-}
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/Program.cs b/tests/JSONTestSuite/parsers/test_Json.NET/Program.cs
deleted file mode 100755
index f5f716772..000000000
--- a/tests/JSONTestSuite/parsers/test_Json.NET/Program.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-using System.IO;
-using Newtonsoft.Json;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- if (args.Length != 1)
- {
- Console.Error.WriteLine($"Usage: {Path.GetFileName(Environment.GetCommandLineArgs()[0])} file.json");
- return 1;
- }
-
- try
- {
- using (var fileStream = new FileStream(args[0], FileMode.Open))
- using (var streamReader = new StreamReader(fileStream))
- using (var jsonReader = new JsonTextReader(streamReader))
- {
- try
- {
- JsonSerializer serializer = JsonSerializer.Create(new JsonSerializerSettings{
- MaxDepth = 512
- });
- var result = serializer.Deserialize(jsonReader);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.Error.WriteLine(e);
- return 1;
- }
- return 0;
- }
- }
- catch (Exception e)
- {
- Console.Error.WriteLine(e);
- return 2;
- }
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/Newtonsoft.Json.dll b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/Newtonsoft.Json.dll
deleted file mode 100755
index 5f2336e6c..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/Newtonsoft.Json.dll and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/System.Runtime.Serialization.Primitives.dll b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/System.Runtime.Serialization.Primitives.dll
deleted file mode 100755
index 7cbc84393..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/System.Runtime.Serialization.Primitives.dll and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.deps.json b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.deps.json
deleted file mode 100755
index bb6752601..000000000
--- a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.deps.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "runtimeTarget": {
- "name": ".NETCoreApp,Version=v1.0",
- "signature": "09db60146a5b8a0d40c5ea0fb7485ab3bbdd4a1a"
- },
- "compilationOptions": {},
- "targets": {
- ".NETCoreApp,Version=v1.0": {
- "test_Json.NET/1.0.0": {
- "dependencies": {
- "Newtonsoft.Json": "9.0.1"
- },
- "runtime": {
- "test_Json.NET.dll": {}
- }
- },
- "Newtonsoft.Json/9.0.1": {
- "dependencies": {
- "System.Runtime.Serialization.Primitives": "4.1.1"
- },
- "runtime": {
- "lib/netstandard1.0/Newtonsoft.Json.dll": {}
- }
- },
- "System.Runtime.Serialization.Primitives/4.1.1": {
- "runtime": {
- "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
- }
- }
- }
- },
- "libraries": {
- "test_Json.NET/1.0.0": {
- "type": "project",
- "serviceable": false,
- "sha512": ""
- },
- "Newtonsoft.Json/9.0.1": {
- "type": "package",
- "serviceable": true,
- "sha512": "sha512-U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw=="
- },
- "System.Runtime.Serialization.Primitives/4.1.1": {
- "type": "package",
- "serviceable": true,
- "sha512": "sha512-HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg=="
- }
- }
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.dll b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.dll
deleted file mode 100755
index e477bb3ec..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.dll and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.pdb b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.pdb
deleted file mode 100755
index 82dc9f1ec..000000000
Binary files a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.pdb and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.runtimeconfig.json b/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.runtimeconfig.json
deleted file mode 100755
index d0437745b..000000000
--- a/tests/JSONTestSuite/parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.runtimeconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "runtimeOptions": {
- "framework": {
- "name": "Microsoft.NETCore.App",
- "version": "1.0.1"
- }
- }
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/project.json b/tests/JSONTestSuite/parsers/test_Json.NET/project.json
deleted file mode 100755
index 3f240a288..000000000
--- a/tests/JSONTestSuite/parsers/test_Json.NET/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "debugType": "portable",
- "emitEntryPoint": true
- },
- "dependencies": {
- "Newtonsoft.Json": "9.0.1"
- },
- "frameworks": {
- "netcoreapp1.0": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.0.1"
- }
- },
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_Json.NET/project.lock.json b/tests/JSONTestSuite/parsers/test_Json.NET/project.lock.json
deleted file mode 100755
index ebf1b8cff..000000000
--- a/tests/JSONTestSuite/parsers/test_Json.NET/project.lock.json
+++ /dev/null
@@ -1,6741 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETCoreApp,Version=v1.0": {
- "Libuv/1.9.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1"
- },
- "runtimeTargets": {
- "runtimes/osx/native/_._": {
- "assetType": "native",
- "rid": "osx"
- }
- }
- },
- "Microsoft.CodeAnalysis.Analyzers/1.1.0": {
- "type": "package"
- },
- "Microsoft.CodeAnalysis.Common/1.3.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.CodeAnalysis.Analyzers": "1.1.0",
- "System.AppContext": "4.1.0",
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Collections.Immutable": "1.2.0",
- "System.Console": "4.0.0",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.FileVersionInfo": "4.0.0",
- "System.Diagnostics.StackTrace": "4.0.1",
- "System.Diagnostics.Tools": "4.0.1",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Metadata": "1.3.0",
- "System.Reflection.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.X509Certificates": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.CodePages": "4.0.1",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Tasks.Parallel": "4.0.1",
- "System.Threading.Thread": "4.0.0",
- "System.Xml.ReaderWriter": "4.0.11",
- "System.Xml.XDocument": "4.0.11",
- "System.Xml.XPath.XDocument": "4.0.1",
- "System.Xml.XmlDocument": "4.0.1"
- },
- "compile": {
- "lib/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "Microsoft.CodeAnalysis.CSharp/1.3.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.CodeAnalysis.Common": "[1.3.0]"
- },
- "compile": {
- "lib/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "Microsoft.CodeAnalysis.VisualBasic/1.3.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.CodeAnalysis.Common": "1.3.0"
- },
- "compile": {
- "lib/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "Microsoft.CSharp/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.0/Microsoft.CSharp.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/Microsoft.CSharp.dll": {}
- }
- },
- "Microsoft.NETCore.App/1.0.1": {
- "type": "package",
- "dependencies": {
- "Libuv": "1.9.0",
- "Microsoft.CSharp": "4.0.1",
- "Microsoft.CodeAnalysis.CSharp": "1.3.0",
- "Microsoft.CodeAnalysis.VisualBasic": "1.3.0",
- "Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
- "Microsoft.NETCore.Runtime.CoreCLR": "1.0.4",
- "Microsoft.VisualBasic": "10.0.1",
- "NETStandard.Library": "1.6.0",
- "System.Buffers": "4.0.0",
- "System.Collections.Immutable": "1.2.0",
- "System.ComponentModel": "4.0.1",
- "System.ComponentModel.Annotations": "4.1.0",
- "System.Diagnostics.DiagnosticSource": "4.0.0",
- "System.Diagnostics.Process": "4.1.0",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Globalization.Extensions": "4.0.1",
- "System.IO.FileSystem.Watcher": "4.0.0",
- "System.IO.MemoryMappedFiles": "4.0.0",
- "System.IO.UnmanagedMemoryStream": "4.0.1",
- "System.Linq.Expressions": "4.1.0",
- "System.Linq.Parallel": "4.0.1",
- "System.Linq.Queryable": "4.0.1",
- "System.Net.NameResolution": "4.0.0",
- "System.Net.Requests": "4.0.11",
- "System.Net.Security": "4.0.0",
- "System.Net.WebHeaderCollection": "4.0.1",
- "System.Numerics.Vectors": "4.1.1",
- "System.Reflection.DispatchProxy": "4.0.1",
- "System.Reflection.Metadata": "1.3.0",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Resources.Reader": "4.0.0",
- "System.Runtime.Loader": "4.0.0",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Security.Cryptography.X509Certificates": "4.1.0",
- "System.Threading.Tasks.Dataflow": "4.6.0",
- "System.Threading.Tasks.Extensions": "4.0.0",
- "System.Threading.Tasks.Parallel": "4.0.1",
- "System.Threading.Thread": "4.0.0",
- "System.Threading.ThreadPool": "4.0.10"
- },
- "compile": {
- "lib/netcoreapp1.0/_._": {}
- },
- "runtime": {
- "lib/netcoreapp1.0/_._": {}
- }
- },
- "Microsoft.NETCore.DotNetHost/1.0.1": {
- "type": "package"
- },
- "Microsoft.NETCore.DotNetHostPolicy/1.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.DotNetHostResolver": "1.0.1"
- }
- },
- "Microsoft.NETCore.DotNetHostResolver/1.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.DotNetHost": "1.0.1"
- }
- },
- "Microsoft.NETCore.Jit/1.0.4": {
- "type": "package"
- },
- "Microsoft.NETCore.Platforms/1.0.1": {
- "type": "package",
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "Microsoft.NETCore.Runtime.CoreCLR/1.0.4": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Jit": "1.0.4",
- "Microsoft.NETCore.Windows.ApiSets": "1.0.1"
- }
- },
- "Microsoft.NETCore.Targets/1.0.1": {
- "type": "package",
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "Microsoft.NETCore.Windows.ApiSets/1.0.1": {
- "type": "package"
- },
- "Microsoft.VisualBasic/10.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.1/Microsoft.VisualBasic.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "Microsoft.Win32.Primitives/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {}
- }
- },
- "Microsoft.Win32.Registry/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "NETStandard.Library/1.6.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Win32.Primitives": "4.0.1",
- "System.AppContext": "4.1.0",
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Console": "4.0.0",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tools": "4.0.1",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.Globalization.Calendars": "4.0.1",
- "System.IO": "4.1.0",
- "System.IO.Compression": "4.1.0",
- "System.IO.Compression.ZipFile": "4.0.1",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.Net.Http": "4.1.0",
- "System.Net.Primitives": "4.0.11",
- "System.Net.Sockets": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Security.Cryptography.X509Certificates": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Text.RegularExpressions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Timer": "4.0.1",
- "System.Xml.ReaderWriter": "4.0.11",
- "System.Xml.XDocument": "4.0.11"
- }
- },
- "Newtonsoft.Json/9.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.CSharp": "4.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Serialization.Primitives": "4.1.1",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Text.RegularExpressions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Xml.ReaderWriter": "4.0.11",
- "System.Xml.XDocument": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.0/Newtonsoft.Json.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/Newtonsoft.Json.dll": {}
- }
- },
- "runtime.native.System/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "runtime.native.System.IO.Compression/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "runtime.native.System.Net.Http/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "runtime.native.System.Net.Security/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "runtime.native.System.Security.Cryptography/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "lib/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "System.AppContext/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.6/System.AppContext.dll": {}
- },
- "runtime": {
- "lib/netstandard1.6/_._": {}
- }
- },
- "System.Buffers/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.1/System.Buffers.dll": {}
- },
- "runtime": {
- "lib/netstandard1.1/_._": {}
- }
- },
- "System.Collections/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Collections.dll": {}
- }
- },
- "System.Collections.Concurrent/4.0.12": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Collections.Concurrent.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Collections.Immutable/1.2.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.0/System.Collections.Immutable.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "System.ComponentModel/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.ComponentModel.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.ComponentModel.Annotations/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.ComponentModel": "4.0.1",
- "System.Globalization": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Text.RegularExpressions": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.4/System.ComponentModel.Annotations.dll": {}
- },
- "runtime": {
- "lib/netstandard1.4/_._": {}
- }
- },
- "System.Console/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.IO": "4.1.0",
- "System.Runtime": "4.1.0",
- "System.Text.Encoding": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Console.dll": {}
- }
- },
- "System.Diagnostics.Debug/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Diagnostics.Debug.dll": {}
- }
- },
- "System.Diagnostics.DiagnosticSource/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Diagnostics.FileVersionInfo/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Reflection.Metadata": "1.3.0",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Diagnostics.Process/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Win32.Primitives": "4.0.1",
- "Microsoft.Win32.Registry": "4.0.0",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Thread": "4.0.0",
- "System.Threading.ThreadPool": "4.0.10",
- "runtime.native.System": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.4/System.Diagnostics.Process.dll": {}
- },
- "runtimeTargets": {
- "runtimes/osx/lib/netstandard1.4/_._": {
- "assetType": "runtime",
- "rid": "osx"
- }
- }
- },
- "System.Diagnostics.StackTrace/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections.Immutable": "1.2.0",
- "System.IO.FileSystem": "4.0.1",
- "System.Reflection": "4.1.0",
- "System.Reflection.Metadata": "1.3.0",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Diagnostics.Tools/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Diagnostics.Tools.dll": {}
- }
- },
- "System.Diagnostics.Tracing/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {}
- }
- },
- "System.Dynamic.Runtime/4.0.11": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit": "4.0.1",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Dynamic.Runtime.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Dynamic.Runtime.dll": {}
- }
- },
- "System.Globalization/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Globalization.dll": {}
- }
- },
- "System.Globalization.Calendars/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Globalization": "4.0.11",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Globalization.Calendars.dll": {}
- }
- },
- "System.Globalization.Extensions/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Globalization": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Globalization.Extensions.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.IO/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.5/System.IO.dll": {}
- }
- },
- "System.IO.Compression/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "runtime.native.System": "4.0.0",
- "runtime.native.System.IO.Compression": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.Compression.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.IO.Compression.ZipFile/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Buffers": "4.0.0",
- "System.IO": "4.1.0",
- "System.IO.Compression": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Text.Encoding": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.IO.FileSystem/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.IO": "4.1.0",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Text.Encoding": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.FileSystem.dll": {}
- }
- },
- "System.IO.FileSystem.Primitives/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {}
- }
- },
- "System.IO.FileSystem.Watcher/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Win32.Primitives": "4.0.1",
- "System.Collections": "4.0.11",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Overlapped": "4.0.1",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Thread": "4.0.0",
- "runtime.native.System": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.FileSystem.Watcher.dll": {}
- },
- "runtimeTargets": {
- "runtimes/osx/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "osx"
- }
- }
- },
- "System.IO.MemoryMappedFiles/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.IO.UnmanagedMemoryStream": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "runtime.native.System": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.MemoryMappedFiles.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.IO.UnmanagedMemoryStream/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.IO": "4.1.0",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.IO.UnmanagedMemoryStream.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Linq/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.6/System.Linq.dll": {}
- },
- "runtime": {
- "lib/netstandard1.6/System.Linq.dll": {}
- }
- },
- "System.Linq.Expressions/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Linq": "4.1.0",
- "System.ObjectModel": "4.0.12",
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit": "4.0.1",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Reflection.Emit.Lightweight": "4.0.1",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.6/System.Linq.Expressions.dll": {}
- },
- "runtime": {
- "lib/netstandard1.6/System.Linq.Expressions.dll": {}
- }
- },
- "System.Linq.Parallel/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Linq": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.1/System.Linq.Parallel.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Linq.Queryable/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Linq.Queryable.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Net.Http/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.DiagnosticSource": "4.0.0",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.Globalization.Extensions": "4.0.1",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.Net.Primitives": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.OpenSsl": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Security.Cryptography.X509Certificates": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "runtime.native.System": "4.0.0",
- "runtime.native.System.Net.Http": "4.0.1",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.Http.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Net.NameResolution/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.Net.Primitives": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Principal.Windows": "4.0.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "runtime.native.System": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.NameResolution.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Net.Primitives/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Handles": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.Primitives.dll": {}
- }
- },
- "System.Net.Requests/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Net.Http": "4.1.0",
- "System.Net.Primitives": "4.0.11",
- "System.Net.WebHeaderCollection": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.Requests.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Net.Security/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Win32.Primitives": "4.0.1",
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Globalization": "4.0.11",
- "System.Globalization.Extensions": "4.0.1",
- "System.IO": "4.1.0",
- "System.Net.Primitives": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Claims": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.OpenSsl": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Security.Cryptography.X509Certificates": "4.1.0",
- "System.Security.Principal": "4.0.1",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.ThreadPool": "4.0.10",
- "runtime.native.System": "4.0.0",
- "runtime.native.System.Net.Security": "4.0.1",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.Security.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Net.Sockets/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.IO": "4.1.0",
- "System.Net.Primitives": "4.0.11",
- "System.Runtime": "4.1.0",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.Sockets.dll": {}
- }
- },
- "System.Net.WebHeaderCollection/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Net.WebHeaderCollection.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Numerics.Vectors/4.1.1": {
- "type": "package",
- "dependencies": {
- "System.Globalization": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Numerics.Vectors.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "System.ObjectModel/4.0.12": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.ObjectModel.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.ObjectModel.dll": {}
- }
- },
- "System.Reflection/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.IO": "4.1.0",
- "System.Reflection.Primitives": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.5/System.Reflection.dll": {}
- }
- },
- "System.Reflection.DispatchProxy/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit": "4.0.1",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Reflection.DispatchProxy.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Reflection.Emit/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.IO": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.1/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Reflection.Emit.dll": {}
- }
- },
- "System.Reflection.Emit.ILGeneration/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Reflection": "4.1.0",
- "System.Reflection.Primitives": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll": {}
- }
- },
- "System.Reflection.Emit.Lightweight/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll": {}
- }
- },
- "System.Reflection.Extensions/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Reflection": "4.1.0",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Reflection.Extensions.dll": {}
- }
- },
- "System.Reflection.Metadata/1.3.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Collections.Immutable": "1.2.0",
- "System.Diagnostics.Debug": "4.0.11",
- "System.IO": "4.1.0",
- "System.Linq": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.1/System.Reflection.Metadata.dll": {}
- },
- "runtime": {
- "lib/netstandard1.1/_._": {}
- }
- },
- "System.Reflection.Primitives/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Reflection.Primitives.dll": {}
- }
- },
- "System.Reflection.TypeExtensions/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Reflection": "4.1.0",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.5/System.Reflection.TypeExtensions.dll": {}
- },
- "runtime": {
- "lib/netstandard1.5/System.Reflection.TypeExtensions.dll": {}
- }
- },
- "System.Resources.Reader/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.0/System.Resources.Reader.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "System.Resources.ResourceManager/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Globalization": "4.0.11",
- "System.Reflection": "4.1.0",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Resources.ResourceManager.dll": {}
- }
- },
- "System.Runtime/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1"
- },
- "compile": {
- "ref/netstandard1.5/System.Runtime.dll": {}
- }
- },
- "System.Runtime.Extensions/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.5/System.Runtime.Extensions.dll": {}
- }
- },
- "System.Runtime.Handles/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Runtime.Handles.dll": {}
- }
- },
- "System.Runtime.InteropServices/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Reflection": "4.1.0",
- "System.Reflection.Primitives": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Handles": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.5/System.Runtime.InteropServices.dll": {}
- }
- },
- "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Threading": "4.0.11",
- "runtime.native.System": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.1/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Runtime.Loader/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.IO": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.5/_._": {}
- },
- "runtime": {
- "lib/netstandard1.5/_._": {}
- }
- },
- "System.Runtime.Numerics/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Globalization": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.1/System.Runtime.Numerics.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Runtime.Serialization.Primitives/4.1.1": {
- "type": "package",
- "dependencies": {
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
- }
- },
- "System.Security.Claims/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Security.Principal": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Security.Cryptography.Algorithms/4.2.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.6/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Security.Cryptography.Cng/4.2.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.6/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.6/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Security.Cryptography.Csp/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.IO": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Security.Cryptography.Encoding/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Linq": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Security.Cryptography.OpenSsl/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.6/_._": {}
- },
- "runtime": {
- "lib/netstandard1.6/_._": {}
- },
- "runtimeTargets": {
- "runtimes/unix/lib/netstandard1.6/_._": {
- "assetType": "runtime",
- "rid": "unix"
- }
- }
- },
- "System.Security.Cryptography.Primitives/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Security.Cryptography.X509Certificates/4.1.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Globalization.Calendars": "4.0.1",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Security.Cryptography.Cng": "4.2.0",
- "System.Security.Cryptography.Csp": "4.0.0",
- "System.Security.Cryptography.Encoding": "4.0.0",
- "System.Security.Cryptography.OpenSsl": "4.0.0",
- "System.Security.Cryptography.Primitives": "4.0.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "runtime.native.System": "4.0.0",
- "runtime.native.System.Net.Http": "4.0.1",
- "runtime.native.System.Security.Cryptography": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.6/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Security.Principal/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.0/System.Security.Principal.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/_._": {}
- }
- },
- "System.Security.Principal.Windows/4.0.0": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.Win32.Primitives": "4.0.1",
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Security.Claims": "4.0.1",
- "System.Security.Principal": "4.0.1",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Text.Encoding/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Text.Encoding.dll": {}
- }
- },
- "System.Text.Encoding.CodePages/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Collections": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.Handles": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Text.Encoding.Extensions/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0",
- "System.Text.Encoding": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {}
- }
- },
- "System.Text.RegularExpressions/4.1.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.6/System.Text.RegularExpressions.dll": {}
- },
- "runtime": {
- "lib/netstandard1.6/System.Text.RegularExpressions.dll": {}
- }
- },
- "System.Threading/4.0.11": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Threading.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Threading.dll": {}
- }
- },
- "System.Threading.Overlapped/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Handles": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtimeTargets": {
- "runtimes/win/lib/netstandard1.3/_._": {
- "assetType": "runtime",
- "rid": "win"
- }
- }
- },
- "System.Threading.Tasks/4.0.11": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Threading.Tasks.dll": {}
- }
- },
- "System.Threading.Tasks.Dataflow/4.6.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Collections.Concurrent": "4.0.12",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Dynamic.Runtime": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.1/System.Threading.Tasks.Dataflow.dll": {}
- },
- "runtime": {
- "lib/netstandard1.1/_._": {}
- }
- },
- "System.Threading.Tasks.Extensions/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Runtime": "4.1.0",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {}
- },
- "runtime": {
- "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {}
- }
- },
- "System.Threading.Tasks.Parallel/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections.Concurrent": "4.0.12",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tracing": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.1/System.Threading.Tasks.Parallel.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Threading.Thread/4.0.0": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Threading.Thread.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Threading.ThreadPool/4.0.10": {
- "type": "package",
- "dependencies": {
- "System.Runtime": "4.1.0",
- "System.Runtime.Handles": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.3/System.Threading.ThreadPool.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Threading.Timer/4.0.1": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "Microsoft.NETCore.Targets": "1.0.1",
- "System.Runtime": "4.1.0"
- },
- "compile": {
- "ref/netstandard1.2/System.Threading.Timer.dll": {}
- }
- },
- "System.Xml.ReaderWriter/4.0.11": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Text.Encoding.Extensions": "4.0.11",
- "System.Text.RegularExpressions": "4.1.0",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Tasks.Extensions": "4.0.0"
- },
- "compile": {
- "ref/netstandard1.3/System.Xml.ReaderWriter.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Xml.ReaderWriter.dll": {}
- }
- },
- "System.Xml.XDocument/4.0.11": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Tools": "4.0.1",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Reflection": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Xml.ReaderWriter": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/System.Xml.XDocument.dll": {}
- },
- "runtime": {
- "lib/netstandard1.3/System.Xml.XDocument.dll": {}
- }
- },
- "System.Xml.XmlDocument/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Text.Encoding": "4.0.11",
- "System.Threading": "4.0.11",
- "System.Xml.ReaderWriter": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Xml.XPath/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Collections": "4.0.11",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Xml.ReaderWriter": "4.0.11"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- },
- "System.Xml.XPath.XDocument/4.0.1": {
- "type": "package",
- "dependencies": {
- "System.Diagnostics.Debug": "4.0.11",
- "System.Linq": "4.1.0",
- "System.Resources.ResourceManager": "4.0.1",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Xml.ReaderWriter": "4.0.11",
- "System.Xml.XDocument": "4.0.11",
- "System.Xml.XPath": "4.0.1"
- },
- "compile": {
- "ref/netstandard1.3/_._": {}
- },
- "runtime": {
- "lib/netstandard1.3/_._": {}
- }
- }
- }
- },
- "libraries": {
- "Libuv/1.9.0": {
- "sha512": "D8v8u5uSFuPNVxs2f7p4jxbNv8dbFuC77iKzvKPdFezOewuzOIqD1TXylLQqA5BEcylP9d0ENJlP/MrTLUEjVA==",
- "type": "package",
- "path": "Libuv/1.9.0",
- "files": [
- "Libuv.1.9.0.nupkg.sha512",
- "Libuv.nuspec",
- "License.txt",
- "runtimes/debian-x64/native/libuv.so",
- "runtimes/fedora-x64/native/libuv.so",
- "runtimes/opensuse-x64/native/libuv.so",
- "runtimes/osx/native/libuv.dylib",
- "runtimes/rhel-x64/native/libuv.so",
- "runtimes/win7-arm/native/libuv.dll",
- "runtimes/win7-x64/native/libuv.dll",
- "runtimes/win7-x86/native/libuv.dll"
- ]
- },
- "Microsoft.CodeAnalysis.Analyzers/1.1.0": {
- "sha512": "OH6ljOMgMRZdmt5fNQ6UTMbdj8raOzuzDSrIW5C2ZKTrCKxVzzXF8yAywokUC+bkK826eeJ2xD5dxIwEAULhFA==",
- "type": "package",
- "path": "Microsoft.CodeAnalysis.Analyzers/1.1.0",
- "files": [
- "Microsoft.CodeAnalysis.Analyzers.1.1.0.nupkg.sha512",
- "Microsoft.CodeAnalysis.Analyzers.nuspec",
- "ThirdPartyNotices.rtf",
- "analyzers/dotnet/cs/Microsoft.CodeAnalysis.Analyzers.dll",
- "analyzers/dotnet/cs/Microsoft.CodeAnalysis.CSharp.Analyzers.dll",
- "analyzers/dotnet/vb/Microsoft.CodeAnalysis.Analyzers.dll",
- "analyzers/dotnet/vb/Microsoft.CodeAnalysis.VisualBasic.Analyzers.dll",
- "tools/install.ps1",
- "tools/uninstall.ps1"
- ]
- },
- "Microsoft.CodeAnalysis.Common/1.3.0": {
- "sha512": "x7OqhuCTG3yGpsbN0jmnxew6nF6GG1JXWcCQ+gvoqlk8rO+JqUYtCJrHtzzw2jFb0kVsZNlRnigqTzbz9tqR5g==",
- "type": "package",
- "path": "Microsoft.CodeAnalysis.Common/1.3.0",
- "files": [
- "Microsoft.CodeAnalysis.Common.1.3.0.nupkg.sha512",
- "Microsoft.CodeAnalysis.Common.nuspec",
- "ThirdPartyNotices.rtf",
- "lib/net45/Microsoft.CodeAnalysis.dll",
- "lib/net45/Microsoft.CodeAnalysis.xml",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.dll",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.xml",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.dll",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.xml"
- ]
- },
- "Microsoft.CodeAnalysis.CSharp/1.3.0": {
- "sha512": "mFf0XRjrNYxpme+j7OwlFS8LiAdL67HAnMv6tiqcwSXXfNz6LFAqcB90jQB8AQIQd/n6TtoqBayf47Fk+1w7HQ==",
- "type": "package",
- "path": "Microsoft.CodeAnalysis.CSharp/1.3.0",
- "files": [
- "Microsoft.CodeAnalysis.CSharp.1.3.0.nupkg.sha512",
- "Microsoft.CodeAnalysis.CSharp.nuspec",
- "ThirdPartyNotices.rtf",
- "lib/net45/Microsoft.CodeAnalysis.CSharp.dll",
- "lib/net45/Microsoft.CodeAnalysis.CSharp.xml",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.CSharp.dll",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.CSharp.xml",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.CSharp.dll",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.CSharp.xml"
- ]
- },
- "Microsoft.CodeAnalysis.VisualBasic/1.3.0": {
- "sha512": "s3UugysCXE1uE/grnNxuifxfz46kftnZya4poBASL1jpQweRd7MBgHMZdwR23wOXkGoqZPOcAbQMnWx4yhiGmw==",
- "type": "package",
- "path": "Microsoft.CodeAnalysis.VisualBasic/1.3.0",
- "files": [
- "Microsoft.CodeAnalysis.VisualBasic.1.3.0.nupkg.sha512",
- "Microsoft.CodeAnalysis.VisualBasic.nuspec",
- "ThirdPartyNotices.rtf",
- "lib/net45/Microsoft.CodeAnalysis.VisualBasic.dll",
- "lib/net45/Microsoft.CodeAnalysis.VisualBasic.xml",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.VisualBasic.dll",
- "lib/netstandard1.3/Microsoft.CodeAnalysis.VisualBasic.xml",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.VisualBasic.dll",
- "lib/portable-net45+win8/Microsoft.CodeAnalysis.VisualBasic.xml"
- ]
- },
- "Microsoft.CSharp/4.0.1": {
- "sha512": "9ghWfwsNHaWVZcy86YIUYGv9c9AZLYZ4Tad47IzjekVrI5zp6TGy6FXoxqdkxGn8apv6TqoaLoRWAAEQXyf60Q==",
- "type": "package",
- "path": "Microsoft.CSharp/4.0.1",
- "files": [
- "Microsoft.CSharp.4.0.1.nupkg.sha512",
- "Microsoft.CSharp.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/Microsoft.CSharp.dll",
- "lib/netstandard1.3/Microsoft.CSharp.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/Microsoft.CSharp.dll",
- "ref/netcore50/Microsoft.CSharp.xml",
- "ref/netcore50/de/Microsoft.CSharp.xml",
- "ref/netcore50/es/Microsoft.CSharp.xml",
- "ref/netcore50/fr/Microsoft.CSharp.xml",
- "ref/netcore50/it/Microsoft.CSharp.xml",
- "ref/netcore50/ja/Microsoft.CSharp.xml",
- "ref/netcore50/ko/Microsoft.CSharp.xml",
- "ref/netcore50/ru/Microsoft.CSharp.xml",
- "ref/netcore50/zh-hans/Microsoft.CSharp.xml",
- "ref/netcore50/zh-hant/Microsoft.CSharp.xml",
- "ref/netstandard1.0/Microsoft.CSharp.dll",
- "ref/netstandard1.0/Microsoft.CSharp.xml",
- "ref/netstandard1.0/de/Microsoft.CSharp.xml",
- "ref/netstandard1.0/es/Microsoft.CSharp.xml",
- "ref/netstandard1.0/fr/Microsoft.CSharp.xml",
- "ref/netstandard1.0/it/Microsoft.CSharp.xml",
- "ref/netstandard1.0/ja/Microsoft.CSharp.xml",
- "ref/netstandard1.0/ko/Microsoft.CSharp.xml",
- "ref/netstandard1.0/ru/Microsoft.CSharp.xml",
- "ref/netstandard1.0/zh-hans/Microsoft.CSharp.xml",
- "ref/netstandard1.0/zh-hant/Microsoft.CSharp.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "Microsoft.NETCore.App/1.0.1": {
- "sha512": "wtgwT7w/yMHKUB5Y0dVzVEoUagz7VaZj9REjfP7GtgzVlAVrrK+V0f59HZPG35JIjE8nfBlzOCR+L61FDJEnNw==",
- "type": "package",
- "path": "Microsoft.NETCore.App/1.0.1",
- "files": [
- "Microsoft.NETCore.App.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.App.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netcoreapp1.0/_._"
- ]
- },
- "Microsoft.NETCore.DotNetHost/1.0.1": {
- "sha512": "SYdAiKG/O9ekimIQ05bbdVjWnY8RBsfKnhmx4OkJv3bhQzOKOTbMgNCTXcUu5k4A2HXF6tCFISlkTRT5WZ3kJQ==",
- "type": "package",
- "path": "Microsoft.NETCore.DotNetHost/1.0.1",
- "files": [
- "Microsoft.NETCore.DotNetHost.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.DotNetHost.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.DotNetHostPolicy/1.0.1": {
- "sha512": "4uX9ChfLNRGAT6kZnXOB51VvveEy7HOiAPBtvSqKeI5fVmNJkCLBOG8JwCxxOU1Yxbgu5OSoZyoYCJt0NqMQuA==",
- "type": "package",
- "path": "Microsoft.NETCore.DotNetHostPolicy/1.0.1",
- "files": [
- "Microsoft.NETCore.DotNetHostPolicy.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.DotNetHostPolicy.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.DotNetHostResolver/1.0.1": {
- "sha512": "yVXttMsS/v8EpK698VTvuCTB4+wI1O7qFjZK3gPul6juCqoXEABRdpe+DxehtZ3qRBkbWH4MXxCyrfI2iOLy2w==",
- "type": "package",
- "path": "Microsoft.NETCore.DotNetHostResolver/1.0.1",
- "files": [
- "Microsoft.NETCore.DotNetHostResolver.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.DotNetHostResolver.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.Jit/1.0.4": {
- "sha512": "EeJczJ2Gxx7ikO7N0IVE+CAv4/G3uYLKZGSGMXz8SgFMSk2fSytUCBBTv8iOAPXflbCOameAe+I+tFKX+6I3vg==",
- "type": "package",
- "path": "Microsoft.NETCore.Jit/1.0.4",
- "files": [
- "Microsoft.NETCore.Jit.1.0.4.nupkg.sha512",
- "Microsoft.NETCore.Jit.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.Platforms/1.0.1": {
- "sha512": "oUUR+PxdiR+DDOMYD/qbSB1gtuuDR9bToBZjqSKwyr/HtzPVpHCg4zl5TgPLaxQ9X/A8VfbPoGUE1c5wi6D2uA==",
- "type": "package",
- "path": "Microsoft.NETCore.Platforms/1.0.1",
- "files": [
- "Microsoft.NETCore.Platforms.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.Platforms.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.Runtime.CoreCLR/1.0.4": {
- "sha512": "YOt2elMGDdHsnmRDMFKk1bjUjNbCuabxCPYYPrXuyrNodXe2uTUh7kRvSow3ONGYX8VHP426PejCwy0vSoFDag==",
- "type": "package",
- "path": "Microsoft.NETCore.Runtime.CoreCLR/1.0.4",
- "files": [
- "Microsoft.NETCore.Runtime.CoreCLR.1.0.4.nupkg.sha512",
- "Microsoft.NETCore.Runtime.CoreCLR.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.Targets/1.0.1": {
- "sha512": "D6W7E7bvLMulsxXkMmMZTkYTr2lbV/J1JHYELebmtXEJVBGUA/E6xuDbbkcxZok/jl/FiM/xDp2JESnff8vAkA==",
- "type": "package",
- "path": "Microsoft.NETCore.Targets/1.0.1",
- "files": [
- "Microsoft.NETCore.Targets.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.Targets.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.json"
- ]
- },
- "Microsoft.NETCore.Windows.ApiSets/1.0.1": {
- "sha512": "j2w31BijMivx1IuXXfiMfJ6aIggvCap3+uwrkBGMdJwZnJfLr0O1Si5dpv503TPWmCfOFC9X8w5EF43CmehFuw==",
- "type": "package",
- "path": "Microsoft.NETCore.Windows.ApiSets/1.0.1",
- "files": [
- "Microsoft.NETCore.Windows.ApiSets.1.0.1.nupkg.sha512",
- "Microsoft.NETCore.Windows.ApiSets.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "runtime.json"
- ]
- },
- "Microsoft.VisualBasic/10.0.1": {
- "sha512": "X7UPwB1yNq1O3x/x+GsPEEZLq2m6/DkFOw+dwMYpvisuLeepCBex6KOIg76N125VkYNKHFYQW1xHKxfUp6rzQA==",
- "type": "package",
- "path": "Microsoft.VisualBasic/10.0.1",
- "files": [
- "Microsoft.VisualBasic.10.0.1.nupkg.sha512",
- "Microsoft.VisualBasic.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net45/_._",
- "lib/netcore50/Microsoft.VisualBasic.dll",
- "lib/netstandard1.3/Microsoft.VisualBasic.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "ref/net45/_._",
- "ref/netcore50/Microsoft.VisualBasic.dll",
- "ref/netcore50/Microsoft.VisualBasic.xml",
- "ref/netcore50/de/Microsoft.VisualBasic.xml",
- "ref/netcore50/es/Microsoft.VisualBasic.xml",
- "ref/netcore50/fr/Microsoft.VisualBasic.xml",
- "ref/netcore50/it/Microsoft.VisualBasic.xml",
- "ref/netcore50/ja/Microsoft.VisualBasic.xml",
- "ref/netcore50/ko/Microsoft.VisualBasic.xml",
- "ref/netcore50/ru/Microsoft.VisualBasic.xml",
- "ref/netcore50/zh-hans/Microsoft.VisualBasic.xml",
- "ref/netcore50/zh-hant/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/Microsoft.VisualBasic.dll",
- "ref/netstandard1.1/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/de/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/es/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/fr/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/it/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/ja/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/ko/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/ru/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/zh-hans/Microsoft.VisualBasic.xml",
- "ref/netstandard1.1/zh-hant/Microsoft.VisualBasic.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._"
- ]
- },
- "Microsoft.Win32.Primitives/4.0.1": {
- "sha512": "blO/BsGSJaNZyiocTXJDAn3zdNUmckwWuxYC0Xv0sTp6KX+4lzV6iJR3YpFrxL6j4wu9lSnAYVQ1FX49G/QJcA==",
- "type": "package",
- "path": "Microsoft.Win32.Primitives/4.0.1",
- "files": [
- "Microsoft.Win32.Primitives.4.0.1.nupkg.sha512",
- "Microsoft.Win32.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/Microsoft.Win32.Primitives.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/Microsoft.Win32.Primitives.dll",
- "ref/netstandard1.3/Microsoft.Win32.Primitives.dll",
- "ref/netstandard1.3/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/de/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/es/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/fr/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/it/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/ja/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/ko/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/ru/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/zh-hans/Microsoft.Win32.Primitives.xml",
- "ref/netstandard1.3/zh-hant/Microsoft.Win32.Primitives.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "Microsoft.Win32.Registry/4.0.0": {
- "sha512": "sKRGsOYljokZ+fG3veg9izmLN/pSNVAkQTsaTqv3Fws8TDJr0uBICSXZz9/d/SCeZhZwqpAUxmnJSrHsOXOPbg==",
- "type": "package",
- "path": "Microsoft.Win32.Registry/4.0.0",
- "files": [
- "Microsoft.Win32.Registry.4.0.0.nupkg.sha512",
- "Microsoft.Win32.Registry.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net46/Microsoft.Win32.Registry.dll",
- "ref/net46/Microsoft.Win32.Registry.dll",
- "ref/netstandard1.3/Microsoft.Win32.Registry.dll",
- "ref/netstandard1.3/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/de/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/es/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/fr/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/it/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/ja/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/ko/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/ru/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/zh-hans/Microsoft.Win32.Registry.xml",
- "ref/netstandard1.3/zh-hant/Microsoft.Win32.Registry.xml",
- "runtimes/unix/lib/netstandard1.3/Microsoft.Win32.Registry.dll",
- "runtimes/win/lib/net46/Microsoft.Win32.Registry.dll",
- "runtimes/win/lib/netcore50/_._",
- "runtimes/win/lib/netstandard1.3/Microsoft.Win32.Registry.dll"
- ]
- },
- "NETStandard.Library/1.6.0": {
- "sha512": "SJiGdgbNk3ihgCwRxHNrIGquXfaWIAFT/J2V2MWrvkQAfxqJa+HPZQ5SBnY+/OEdJamg1jDbbn2TPtl0dEFWPA==",
- "type": "package",
- "path": "NETStandard.Library/1.6.0",
- "files": [
- "NETStandard.Library.1.6.0.nupkg.sha512",
- "NETStandard.Library.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt"
- ]
- },
- "Newtonsoft.Json/9.0.1": {
- "sha512": "U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw==",
- "type": "package",
- "path": "Newtonsoft.Json/9.0.1",
- "files": [
- "Newtonsoft.Json.9.0.1.nupkg.sha512",
- "Newtonsoft.Json.nuspec",
- "lib/net20/Newtonsoft.Json.dll",
- "lib/net20/Newtonsoft.Json.xml",
- "lib/net35/Newtonsoft.Json.dll",
- "lib/net35/Newtonsoft.Json.xml",
- "lib/net40/Newtonsoft.Json.dll",
- "lib/net40/Newtonsoft.Json.xml",
- "lib/net45/Newtonsoft.Json.dll",
- "lib/net45/Newtonsoft.Json.xml",
- "lib/netstandard1.0/Newtonsoft.Json.dll",
- "lib/netstandard1.0/Newtonsoft.Json.xml",
- "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll",
- "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml",
- "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll",
- "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml",
- "tools/install.ps1"
- ]
- },
- "runtime.native.System/4.0.0": {
- "sha512": "gFmH1mF+QbzRzVT93fsDgvjOv8BdosZrRo14BDAkU3DgjhjvRMvfqzFQROFfu3NabxUjfeGMAsJ/VFED3EvWdA==",
- "type": "package",
- "path": "runtime.native.System/4.0.0",
- "files": [
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.native.System.4.0.0.nupkg.sha512",
- "runtime.native.System.nuspec"
- ]
- },
- "runtime.native.System.IO.Compression/4.1.0": {
- "sha512": "8KVM+e9f20jMcW0nxaLZZb1/SuKXpqLDkXE0yOJscB1i84ibUnirFvvHwbKE/4Zw+1EhnXqbW6gfRQG5pTY7/Q==",
- "type": "package",
- "path": "runtime.native.System.IO.Compression/4.1.0",
- "files": [
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.native.System.IO.Compression.4.1.0.nupkg.sha512",
- "runtime.native.System.IO.Compression.nuspec"
- ]
- },
- "runtime.native.System.Net.Http/4.0.1": {
- "sha512": "KjLWjCsLyD3b8mfCtNyR4pXowLdBq9Z2CZUcy0bo4RHIW9TutuvILOlDKR7q/DLMNC8DODqknLspZm6FupE/qA==",
- "type": "package",
- "path": "runtime.native.System.Net.Http/4.0.1",
- "files": [
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.native.System.Net.Http.4.0.1.nupkg.sha512",
- "runtime.native.System.Net.Http.nuspec"
- ]
- },
- "runtime.native.System.Net.Security/4.0.1": {
- "sha512": "a55jykBPMea1SIVjJEN1PvQ4KnyL1ZG8i60MBDzLk5Eu4IakIPetbnOc+d4knFtUKfzUcNW95BlprQU5IWuALg==",
- "type": "package",
- "path": "runtime.native.System.Net.Security/4.0.1",
- "files": [
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.native.System.Net.Security.4.0.1.nupkg.sha512",
- "runtime.native.System.Net.Security.nuspec"
- ]
- },
- "runtime.native.System.Security.Cryptography/4.0.0": {
- "sha512": "X2LMjiJLUp7SmlOEcJIZkLuMe8ns8EB1SDeGTgTwQta2XFGU8W7pnORYg17dMA6p002pXHCWlWrP6M0d4rSWCA==",
- "type": "package",
- "path": "runtime.native.System.Security.Cryptography/4.0.0",
- "files": [
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/_._",
- "runtime.native.System.Security.Cryptography.4.0.0.nupkg.sha512",
- "runtime.native.System.Security.Cryptography.nuspec"
- ]
- },
- "System.AppContext/4.1.0": {
- "sha512": "5Km5wcAufp3oVpLzIvB3APvVCjmZQB04rwl6kjMLOGDZW/w+kZPEMmTisoG4V6UkZ2o0Kyg9hYB66kkCdEIL+g==",
- "type": "package",
- "path": "System.AppContext/4.1.0",
- "files": [
- "System.AppContext.4.1.0.nupkg.sha512",
- "System.AppContext.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.AppContext.dll",
- "lib/net463/System.AppContext.dll",
- "lib/netcore50/System.AppContext.dll",
- "lib/netstandard1.6/System.AppContext.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.AppContext.dll",
- "ref/net463/System.AppContext.dll",
- "ref/netstandard/_._",
- "ref/netstandard1.3/System.AppContext.dll",
- "ref/netstandard1.3/System.AppContext.xml",
- "ref/netstandard1.3/de/System.AppContext.xml",
- "ref/netstandard1.3/es/System.AppContext.xml",
- "ref/netstandard1.3/fr/System.AppContext.xml",
- "ref/netstandard1.3/it/System.AppContext.xml",
- "ref/netstandard1.3/ja/System.AppContext.xml",
- "ref/netstandard1.3/ko/System.AppContext.xml",
- "ref/netstandard1.3/ru/System.AppContext.xml",
- "ref/netstandard1.3/zh-hans/System.AppContext.xml",
- "ref/netstandard1.3/zh-hant/System.AppContext.xml",
- "ref/netstandard1.6/System.AppContext.dll",
- "ref/netstandard1.6/System.AppContext.xml",
- "ref/netstandard1.6/de/System.AppContext.xml",
- "ref/netstandard1.6/es/System.AppContext.xml",
- "ref/netstandard1.6/fr/System.AppContext.xml",
- "ref/netstandard1.6/it/System.AppContext.xml",
- "ref/netstandard1.6/ja/System.AppContext.xml",
- "ref/netstandard1.6/ko/System.AppContext.xml",
- "ref/netstandard1.6/ru/System.AppContext.xml",
- "ref/netstandard1.6/zh-hans/System.AppContext.xml",
- "ref/netstandard1.6/zh-hant/System.AppContext.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.AppContext.dll"
- ]
- },
- "System.Buffers/4.0.0": {
- "sha512": "YnxcvD1w2t1M+e/ILFMmHG8SOAtFo0SXyLrF38QWLM+oFBWUD4yZx3uCzPTZOUw9kQnQwp93VvC30SZygWNN6g==",
- "type": "package",
- "path": "System.Buffers/4.0.0",
- "files": [
- "System.Buffers.4.0.0.nupkg.sha512",
- "System.Buffers.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.1/.xml",
- "lib/netstandard1.1/System.Buffers.dll"
- ]
- },
- "System.Collections/4.0.11": {
- "sha512": "Q8IfQjdxgGhg7xO82qGScQqrSh0gGT5bZltznwc4rbLW9i65GPJa11dskMHDtiWXMKfKoe0B71U1S70zZd61mw==",
- "type": "package",
- "path": "System.Collections/4.0.11",
- "files": [
- "System.Collections.4.0.11.nupkg.sha512",
- "System.Collections.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Collections.dll",
- "ref/netcore50/System.Collections.xml",
- "ref/netcore50/de/System.Collections.xml",
- "ref/netcore50/es/System.Collections.xml",
- "ref/netcore50/fr/System.Collections.xml",
- "ref/netcore50/it/System.Collections.xml",
- "ref/netcore50/ja/System.Collections.xml",
- "ref/netcore50/ko/System.Collections.xml",
- "ref/netcore50/ru/System.Collections.xml",
- "ref/netcore50/zh-hans/System.Collections.xml",
- "ref/netcore50/zh-hant/System.Collections.xml",
- "ref/netstandard1.0/System.Collections.dll",
- "ref/netstandard1.0/System.Collections.xml",
- "ref/netstandard1.0/de/System.Collections.xml",
- "ref/netstandard1.0/es/System.Collections.xml",
- "ref/netstandard1.0/fr/System.Collections.xml",
- "ref/netstandard1.0/it/System.Collections.xml",
- "ref/netstandard1.0/ja/System.Collections.xml",
- "ref/netstandard1.0/ko/System.Collections.xml",
- "ref/netstandard1.0/ru/System.Collections.xml",
- "ref/netstandard1.0/zh-hans/System.Collections.xml",
- "ref/netstandard1.0/zh-hant/System.Collections.xml",
- "ref/netstandard1.3/System.Collections.dll",
- "ref/netstandard1.3/System.Collections.xml",
- "ref/netstandard1.3/de/System.Collections.xml",
- "ref/netstandard1.3/es/System.Collections.xml",
- "ref/netstandard1.3/fr/System.Collections.xml",
- "ref/netstandard1.3/it/System.Collections.xml",
- "ref/netstandard1.3/ja/System.Collections.xml",
- "ref/netstandard1.3/ko/System.Collections.xml",
- "ref/netstandard1.3/ru/System.Collections.xml",
- "ref/netstandard1.3/zh-hans/System.Collections.xml",
- "ref/netstandard1.3/zh-hant/System.Collections.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Collections.Concurrent/4.0.12": {
- "sha512": "7x8U6XmBv2xdZBSpF2mvgdmuWZtUthW2+uacIl/l72sY9RWbczkbb1u+BjdajyzMN0JIM+bwUvduCYxXmjD/5A==",
- "type": "package",
- "path": "System.Collections.Concurrent/4.0.12",
- "files": [
- "System.Collections.Concurrent.4.0.12.nupkg.sha512",
- "System.Collections.Concurrent.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Collections.Concurrent.dll",
- "lib/netstandard1.3/System.Collections.Concurrent.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Collections.Concurrent.dll",
- "ref/netcore50/System.Collections.Concurrent.xml",
- "ref/netcore50/de/System.Collections.Concurrent.xml",
- "ref/netcore50/es/System.Collections.Concurrent.xml",
- "ref/netcore50/fr/System.Collections.Concurrent.xml",
- "ref/netcore50/it/System.Collections.Concurrent.xml",
- "ref/netcore50/ja/System.Collections.Concurrent.xml",
- "ref/netcore50/ko/System.Collections.Concurrent.xml",
- "ref/netcore50/ru/System.Collections.Concurrent.xml",
- "ref/netcore50/zh-hans/System.Collections.Concurrent.xml",
- "ref/netcore50/zh-hant/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/System.Collections.Concurrent.dll",
- "ref/netstandard1.1/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/de/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/es/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/fr/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/it/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/ja/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/ko/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/ru/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/zh-hans/System.Collections.Concurrent.xml",
- "ref/netstandard1.1/zh-hant/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/System.Collections.Concurrent.dll",
- "ref/netstandard1.3/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/de/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/es/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/fr/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/it/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/ja/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/ko/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/ru/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/zh-hans/System.Collections.Concurrent.xml",
- "ref/netstandard1.3/zh-hant/System.Collections.Concurrent.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Collections.Immutable/1.2.0": {
- "sha512": "DQaTY0MHjfJ0h0Go/qlFxkdwWVgR6wIhTw9DD8QdiFhjweE3mduvOu1SBYNLMycX5lKHjq3gv8K37++atweafA==",
- "type": "package",
- "path": "System.Collections.Immutable/1.2.0",
- "files": [
- "System.Collections.Immutable.1.2.0.nupkg.sha512",
- "System.Collections.Immutable.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/System.Collections.Immutable.dll",
- "lib/netstandard1.0/System.Collections.Immutable.xml",
- "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll",
- "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.xml"
- ]
- },
- "System.ComponentModel/4.0.1": {
- "sha512": "cZ7UeRSwTYaLTMQ7fxkjODurM8JihcdjIQNsYCTlOshdDmXmWPRWLS3xz8mDlSVU4pQAdVTXBHo+wO6Xf5uO9w==",
- "type": "package",
- "path": "System.ComponentModel/4.0.1",
- "files": [
- "System.ComponentModel.4.0.1.nupkg.sha512",
- "System.ComponentModel.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.ComponentModel.dll",
- "lib/netstandard1.3/System.ComponentModel.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.ComponentModel.dll",
- "ref/netcore50/System.ComponentModel.xml",
- "ref/netcore50/de/System.ComponentModel.xml",
- "ref/netcore50/es/System.ComponentModel.xml",
- "ref/netcore50/fr/System.ComponentModel.xml",
- "ref/netcore50/it/System.ComponentModel.xml",
- "ref/netcore50/ja/System.ComponentModel.xml",
- "ref/netcore50/ko/System.ComponentModel.xml",
- "ref/netcore50/ru/System.ComponentModel.xml",
- "ref/netcore50/zh-hans/System.ComponentModel.xml",
- "ref/netcore50/zh-hant/System.ComponentModel.xml",
- "ref/netstandard1.0/System.ComponentModel.dll",
- "ref/netstandard1.0/System.ComponentModel.xml",
- "ref/netstandard1.0/de/System.ComponentModel.xml",
- "ref/netstandard1.0/es/System.ComponentModel.xml",
- "ref/netstandard1.0/fr/System.ComponentModel.xml",
- "ref/netstandard1.0/it/System.ComponentModel.xml",
- "ref/netstandard1.0/ja/System.ComponentModel.xml",
- "ref/netstandard1.0/ko/System.ComponentModel.xml",
- "ref/netstandard1.0/ru/System.ComponentModel.xml",
- "ref/netstandard1.0/zh-hans/System.ComponentModel.xml",
- "ref/netstandard1.0/zh-hant/System.ComponentModel.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.ComponentModel.Annotations/4.1.0": {
- "sha512": "KdgtuTz/RAAsuJk9cqebTM/pPYwxXzTP923N8BlbEmIdNZyjCfPBfDTG263ifarRj089s1DlkeK6MsQPItlpiQ==",
- "type": "package",
- "path": "System.ComponentModel.Annotations/4.1.0",
- "files": [
- "System.ComponentModel.Annotations.4.1.0.nupkg.sha512",
- "System.ComponentModel.Annotations.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net461/System.ComponentModel.Annotations.dll",
- "lib/netcore50/System.ComponentModel.Annotations.dll",
- "lib/netstandard1.4/System.ComponentModel.Annotations.dll",
- "lib/portable-net45+win8/_._",
- "lib/win8/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net461/System.ComponentModel.Annotations.dll",
- "ref/netcore50/System.ComponentModel.Annotations.dll",
- "ref/netcore50/System.ComponentModel.Annotations.xml",
- "ref/netcore50/de/System.ComponentModel.Annotations.xml",
- "ref/netcore50/es/System.ComponentModel.Annotations.xml",
- "ref/netcore50/fr/System.ComponentModel.Annotations.xml",
- "ref/netcore50/it/System.ComponentModel.Annotations.xml",
- "ref/netcore50/ja/System.ComponentModel.Annotations.xml",
- "ref/netcore50/ko/System.ComponentModel.Annotations.xml",
- "ref/netcore50/ru/System.ComponentModel.Annotations.xml",
- "ref/netcore50/zh-hans/System.ComponentModel.Annotations.xml",
- "ref/netcore50/zh-hant/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/System.ComponentModel.Annotations.dll",
- "ref/netstandard1.1/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/de/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/es/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/fr/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/it/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/ja/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/ko/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/ru/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/zh-hans/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.1/zh-hant/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/System.ComponentModel.Annotations.dll",
- "ref/netstandard1.3/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/de/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/es/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/fr/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/it/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/ja/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/ko/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/ru/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/zh-hans/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.3/zh-hant/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/System.ComponentModel.Annotations.dll",
- "ref/netstandard1.4/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/de/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/es/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/fr/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/it/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/ja/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/ko/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/ru/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/zh-hans/System.ComponentModel.Annotations.xml",
- "ref/netstandard1.4/zh-hant/System.ComponentModel.Annotations.xml",
- "ref/portable-net45+win8/_._",
- "ref/win8/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Console/4.0.0": {
- "sha512": "Csrh0bnPH2QRA72lcxefVJ6ecCHWsTc28ruaEKDNLX0MKB30LhS0o77l9rqde0LVd1+HlD5Mx/sLAhJdAdVHaw==",
- "type": "package",
- "path": "System.Console/4.0.0",
- "files": [
- "System.Console.4.0.0.nupkg.sha512",
- "System.Console.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Console.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Console.dll",
- "ref/netstandard1.3/System.Console.dll",
- "ref/netstandard1.3/System.Console.xml",
- "ref/netstandard1.3/de/System.Console.xml",
- "ref/netstandard1.3/es/System.Console.xml",
- "ref/netstandard1.3/fr/System.Console.xml",
- "ref/netstandard1.3/it/System.Console.xml",
- "ref/netstandard1.3/ja/System.Console.xml",
- "ref/netstandard1.3/ko/System.Console.xml",
- "ref/netstandard1.3/ru/System.Console.xml",
- "ref/netstandard1.3/zh-hans/System.Console.xml",
- "ref/netstandard1.3/zh-hant/System.Console.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Diagnostics.Debug/4.0.11": {
- "sha512": "ZPSemq+D8LPPdQ31o4MdF9TuWO57pGsktFEqWoseVfRBtk61ahIZFB1PBUiezuS1oLE7O5PDaj7HPGqcdKXxzw==",
- "type": "package",
- "path": "System.Diagnostics.Debug/4.0.11",
- "files": [
- "System.Diagnostics.Debug.4.0.11.nupkg.sha512",
- "System.Diagnostics.Debug.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Diagnostics.Debug.dll",
- "ref/netcore50/System.Diagnostics.Debug.xml",
- "ref/netcore50/de/System.Diagnostics.Debug.xml",
- "ref/netcore50/es/System.Diagnostics.Debug.xml",
- "ref/netcore50/fr/System.Diagnostics.Debug.xml",
- "ref/netcore50/it/System.Diagnostics.Debug.xml",
- "ref/netcore50/ja/System.Diagnostics.Debug.xml",
- "ref/netcore50/ko/System.Diagnostics.Debug.xml",
- "ref/netcore50/ru/System.Diagnostics.Debug.xml",
- "ref/netcore50/zh-hans/System.Diagnostics.Debug.xml",
- "ref/netcore50/zh-hant/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/System.Diagnostics.Debug.dll",
- "ref/netstandard1.0/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/de/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/es/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/fr/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/it/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/ja/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/ko/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/ru/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/zh-hans/System.Diagnostics.Debug.xml",
- "ref/netstandard1.0/zh-hant/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/System.Diagnostics.Debug.dll",
- "ref/netstandard1.3/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/de/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/es/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/fr/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/it/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/ja/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/ko/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/ru/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/zh-hans/System.Diagnostics.Debug.xml",
- "ref/netstandard1.3/zh-hant/System.Diagnostics.Debug.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Diagnostics.DiagnosticSource/4.0.0": {
- "sha512": "mm9ia/8ccnqwhP8ocxahTkBrpZZlHCaKfJrooXAIPPY0XaeMKxawRmsCumRxqNy/s9ca92B9vM+GkQK3g95D5A==",
- "type": "package",
- "path": "System.Diagnostics.DiagnosticSource/4.0.0",
- "files": [
- "System.Diagnostics.DiagnosticSource.4.0.0.nupkg.sha512",
- "System.Diagnostics.DiagnosticSource.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net46/System.Diagnostics.DiagnosticSource.dll",
- "lib/net46/System.Diagnostics.DiagnosticSource.xml",
- "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.dll",
- "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.xml",
- "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll",
- "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.xml",
- "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.dll",
- "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.xml"
- ]
- },
- "System.Diagnostics.FileVersionInfo/4.0.0": {
- "sha512": "yEylMXNSFocrjNF+X3b8wsQqOowse01NkGIBmlH5sz5MS/zYIpi373AQP5xwcFMXh1lLhJDtUrVWabY3jtHU/A==",
- "type": "package",
- "path": "System.Diagnostics.FileVersionInfo/4.0.0",
- "files": [
- "System.Diagnostics.FileVersionInfo.4.0.0.nupkg.sha512",
- "System.Diagnostics.FileVersionInfo.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Diagnostics.FileVersionInfo.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Diagnostics.FileVersionInfo.dll",
- "ref/netstandard1.3/System.Diagnostics.FileVersionInfo.dll",
- "ref/netstandard1.3/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/de/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/es/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/fr/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/it/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/ja/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/ko/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/ru/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/zh-hans/System.Diagnostics.FileVersionInfo.xml",
- "ref/netstandard1.3/zh-hant/System.Diagnostics.FileVersionInfo.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Diagnostics.FileVersionInfo.dll",
- "runtimes/win/lib/net46/System.Diagnostics.FileVersionInfo.dll",
- "runtimes/win/lib/netcore50/System.Diagnostics.FileVersionInfo.dll",
- "runtimes/win/lib/netstandard1.3/System.Diagnostics.FileVersionInfo.dll"
- ]
- },
- "System.Diagnostics.Process/4.1.0": {
- "sha512": "M+yw/XrfdXHOOO8jkcXjs/WEkNF4tbsfRZAcPv75eAFQ+kqNef5vkBbzEjzJP7VZ9cHKh9wevW35M77nZA3nAA==",
- "type": "package",
- "path": "System.Diagnostics.Process/4.1.0",
- "files": [
- "System.Diagnostics.Process.4.1.0.nupkg.sha512",
- "System.Diagnostics.Process.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Diagnostics.Process.dll",
- "lib/net461/System.Diagnostics.Process.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Diagnostics.Process.dll",
- "ref/net461/System.Diagnostics.Process.dll",
- "ref/netstandard1.3/System.Diagnostics.Process.dll",
- "ref/netstandard1.3/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/de/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/es/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/fr/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/it/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/ja/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/ko/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/ru/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/zh-hans/System.Diagnostics.Process.xml",
- "ref/netstandard1.3/zh-hant/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/System.Diagnostics.Process.dll",
- "ref/netstandard1.4/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/de/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/es/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/fr/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/it/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/ja/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/ko/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/ru/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/zh-hans/System.Diagnostics.Process.xml",
- "ref/netstandard1.4/zh-hant/System.Diagnostics.Process.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/linux/lib/netstandard1.4/System.Diagnostics.Process.dll",
- "runtimes/osx/lib/netstandard1.4/System.Diagnostics.Process.dll",
- "runtimes/win/lib/net46/System.Diagnostics.Process.dll",
- "runtimes/win/lib/net461/System.Diagnostics.Process.dll",
- "runtimes/win/lib/netstandard1.4/System.Diagnostics.Process.dll",
- "runtimes/win7/lib/netcore50/_._"
- ]
- },
- "System.Diagnostics.StackTrace/4.0.1": {
- "sha512": "YHqAy1CS6a3SEH9cZkYGozIyf96OwyEHUaNoJcofN7OmPbJWU1e0m7ZuLy8TiCgfHFMNgmStCrcrmX6YK5jGww==",
- "type": "package",
- "path": "System.Diagnostics.StackTrace/4.0.1",
- "files": [
- "System.Diagnostics.StackTrace.4.0.1.nupkg.sha512",
- "System.Diagnostics.StackTrace.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Diagnostics.StackTrace.dll",
- "lib/netstandard1.3/System.Diagnostics.StackTrace.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Diagnostics.StackTrace.dll",
- "ref/netstandard1.3/System.Diagnostics.StackTrace.dll",
- "ref/netstandard1.3/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/de/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/es/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/fr/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/it/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/ja/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/ko/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/ru/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/zh-hans/System.Diagnostics.StackTrace.xml",
- "ref/netstandard1.3/zh-hant/System.Diagnostics.StackTrace.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Diagnostics.StackTrace.dll"
- ]
- },
- "System.Diagnostics.Tools/4.0.1": {
- "sha512": "gsMDPD+hZUQjKSCco+l523+KnLu5ecGyRH6ROMKQ99TWgS6HBCjuAefAAHZBxxzpfdOdftWxIT/yRpxnK16GRQ==",
- "type": "package",
- "path": "System.Diagnostics.Tools/4.0.1",
- "files": [
- "System.Diagnostics.Tools.4.0.1.nupkg.sha512",
- "System.Diagnostics.Tools.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Diagnostics.Tools.dll",
- "ref/netcore50/System.Diagnostics.Tools.xml",
- "ref/netcore50/de/System.Diagnostics.Tools.xml",
- "ref/netcore50/es/System.Diagnostics.Tools.xml",
- "ref/netcore50/fr/System.Diagnostics.Tools.xml",
- "ref/netcore50/it/System.Diagnostics.Tools.xml",
- "ref/netcore50/ja/System.Diagnostics.Tools.xml",
- "ref/netcore50/ko/System.Diagnostics.Tools.xml",
- "ref/netcore50/ru/System.Diagnostics.Tools.xml",
- "ref/netcore50/zh-hans/System.Diagnostics.Tools.xml",
- "ref/netcore50/zh-hant/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/System.Diagnostics.Tools.dll",
- "ref/netstandard1.0/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/de/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/es/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/fr/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/it/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/ja/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/ko/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/ru/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/zh-hans/System.Diagnostics.Tools.xml",
- "ref/netstandard1.0/zh-hant/System.Diagnostics.Tools.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Diagnostics.Tracing/4.1.0": {
- "sha512": "ZaM+U6aVTDoNkJS2IVccYjCrMU2LSyfXFKsMHp1+O1KVjpAuvryPFKOz7msel4h8zOKQS3Ra24n0nsLS2eQ3qg==",
- "type": "package",
- "path": "System.Diagnostics.Tracing/4.1.0",
- "files": [
- "System.Diagnostics.Tracing.4.1.0.nupkg.sha512",
- "System.Diagnostics.Tracing.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.Diagnostics.Tracing.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.Diagnostics.Tracing.dll",
- "ref/netcore50/System.Diagnostics.Tracing.dll",
- "ref/netcore50/System.Diagnostics.Tracing.xml",
- "ref/netcore50/de/System.Diagnostics.Tracing.xml",
- "ref/netcore50/es/System.Diagnostics.Tracing.xml",
- "ref/netcore50/fr/System.Diagnostics.Tracing.xml",
- "ref/netcore50/it/System.Diagnostics.Tracing.xml",
- "ref/netcore50/ja/System.Diagnostics.Tracing.xml",
- "ref/netcore50/ko/System.Diagnostics.Tracing.xml",
- "ref/netcore50/ru/System.Diagnostics.Tracing.xml",
- "ref/netcore50/zh-hans/System.Diagnostics.Tracing.xml",
- "ref/netcore50/zh-hant/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/System.Diagnostics.Tracing.dll",
- "ref/netstandard1.1/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/de/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/es/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/fr/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/it/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/ja/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/ko/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/ru/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/zh-hans/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.1/zh-hant/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/System.Diagnostics.Tracing.dll",
- "ref/netstandard1.2/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/de/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/es/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/fr/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/it/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/ja/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/ko/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/ru/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/zh-hans/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.2/zh-hant/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/System.Diagnostics.Tracing.dll",
- "ref/netstandard1.3/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/de/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/es/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/fr/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/it/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/ja/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/ko/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/ru/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/zh-hans/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.3/zh-hant/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/System.Diagnostics.Tracing.dll",
- "ref/netstandard1.5/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/de/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/es/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/fr/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/it/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/ja/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/ko/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/ru/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/zh-hans/System.Diagnostics.Tracing.xml",
- "ref/netstandard1.5/zh-hant/System.Diagnostics.Tracing.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Dynamic.Runtime/4.0.11": {
- "sha512": "hVeEKnlsPLX5jWZwRzCrqIZyJqaF7IKP77F7RCjsBdg+U5Fdze1ECoU5X08YEo4pLWkaA4oLpFeE+VX3AR20DQ==",
- "type": "package",
- "path": "System.Dynamic.Runtime/4.0.11",
- "files": [
- "System.Dynamic.Runtime.4.0.11.nupkg.sha512",
- "System.Dynamic.Runtime.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Dynamic.Runtime.dll",
- "lib/netstandard1.3/System.Dynamic.Runtime.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Dynamic.Runtime.dll",
- "ref/netcore50/System.Dynamic.Runtime.xml",
- "ref/netcore50/de/System.Dynamic.Runtime.xml",
- "ref/netcore50/es/System.Dynamic.Runtime.xml",
- "ref/netcore50/fr/System.Dynamic.Runtime.xml",
- "ref/netcore50/it/System.Dynamic.Runtime.xml",
- "ref/netcore50/ja/System.Dynamic.Runtime.xml",
- "ref/netcore50/ko/System.Dynamic.Runtime.xml",
- "ref/netcore50/ru/System.Dynamic.Runtime.xml",
- "ref/netcore50/zh-hans/System.Dynamic.Runtime.xml",
- "ref/netcore50/zh-hant/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/System.Dynamic.Runtime.dll",
- "ref/netstandard1.0/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/de/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/es/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/fr/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/it/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/ja/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/ko/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/ru/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/zh-hans/System.Dynamic.Runtime.xml",
- "ref/netstandard1.0/zh-hant/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/System.Dynamic.Runtime.dll",
- "ref/netstandard1.3/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/de/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/es/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/fr/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/it/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/ja/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/ko/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/ru/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/zh-hans/System.Dynamic.Runtime.xml",
- "ref/netstandard1.3/zh-hant/System.Dynamic.Runtime.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Dynamic.Runtime.dll"
- ]
- },
- "System.Globalization/4.0.11": {
- "sha512": "4OkH9ucdngUq3WvXclho8fxvspuHU8YivNvcWWO55+MhdmB4feKf9RPwzSoEQ6wA0KcLYT3yAPU7lr0MHUGcCw==",
- "type": "package",
- "path": "System.Globalization/4.0.11",
- "files": [
- "System.Globalization.4.0.11.nupkg.sha512",
- "System.Globalization.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Globalization.dll",
- "ref/netcore50/System.Globalization.xml",
- "ref/netcore50/de/System.Globalization.xml",
- "ref/netcore50/es/System.Globalization.xml",
- "ref/netcore50/fr/System.Globalization.xml",
- "ref/netcore50/it/System.Globalization.xml",
- "ref/netcore50/ja/System.Globalization.xml",
- "ref/netcore50/ko/System.Globalization.xml",
- "ref/netcore50/ru/System.Globalization.xml",
- "ref/netcore50/zh-hans/System.Globalization.xml",
- "ref/netcore50/zh-hant/System.Globalization.xml",
- "ref/netstandard1.0/System.Globalization.dll",
- "ref/netstandard1.0/System.Globalization.xml",
- "ref/netstandard1.0/de/System.Globalization.xml",
- "ref/netstandard1.0/es/System.Globalization.xml",
- "ref/netstandard1.0/fr/System.Globalization.xml",
- "ref/netstandard1.0/it/System.Globalization.xml",
- "ref/netstandard1.0/ja/System.Globalization.xml",
- "ref/netstandard1.0/ko/System.Globalization.xml",
- "ref/netstandard1.0/ru/System.Globalization.xml",
- "ref/netstandard1.0/zh-hans/System.Globalization.xml",
- "ref/netstandard1.0/zh-hant/System.Globalization.xml",
- "ref/netstandard1.3/System.Globalization.dll",
- "ref/netstandard1.3/System.Globalization.xml",
- "ref/netstandard1.3/de/System.Globalization.xml",
- "ref/netstandard1.3/es/System.Globalization.xml",
- "ref/netstandard1.3/fr/System.Globalization.xml",
- "ref/netstandard1.3/it/System.Globalization.xml",
- "ref/netstandard1.3/ja/System.Globalization.xml",
- "ref/netstandard1.3/ko/System.Globalization.xml",
- "ref/netstandard1.3/ru/System.Globalization.xml",
- "ref/netstandard1.3/zh-hans/System.Globalization.xml",
- "ref/netstandard1.3/zh-hant/System.Globalization.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Globalization.Calendars/4.0.1": {
- "sha512": "Rx7SxJI4VoRvUFS/O5xjK1iQFVGqwBSi6wlt4ZDYhE6dN6H4LQ8zWAvGab/j0EDFh/yOQ0AL15XG3kj/hUkKSQ==",
- "type": "package",
- "path": "System.Globalization.Calendars/4.0.1",
- "files": [
- "System.Globalization.Calendars.4.0.1.nupkg.sha512",
- "System.Globalization.Calendars.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Globalization.Calendars.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Globalization.Calendars.dll",
- "ref/netstandard1.3/System.Globalization.Calendars.dll",
- "ref/netstandard1.3/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/de/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/es/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/fr/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/it/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/ja/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/ko/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/ru/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/zh-hans/System.Globalization.Calendars.xml",
- "ref/netstandard1.3/zh-hant/System.Globalization.Calendars.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Globalization.Extensions/4.0.1": {
- "sha512": "ywlaKelQMSMGlwOcVuepCJXxLBZSgrZlXIYjWPvoA4XW/fqf/gji3yB6m1SdrmPoE9HsAXAuyF9V4SjZEnyvbA==",
- "type": "package",
- "path": "System.Globalization.Extensions/4.0.1",
- "files": [
- "System.Globalization.Extensions.4.0.1.nupkg.sha512",
- "System.Globalization.Extensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Globalization.Extensions.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Globalization.Extensions.dll",
- "ref/netstandard1.3/System.Globalization.Extensions.dll",
- "ref/netstandard1.3/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/de/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/es/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/fr/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/it/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/ja/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/ko/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/ru/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/zh-hans/System.Globalization.Extensions.xml",
- "ref/netstandard1.3/zh-hant/System.Globalization.Extensions.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Globalization.Extensions.dll",
- "runtimes/win/lib/net46/System.Globalization.Extensions.dll",
- "runtimes/win/lib/netstandard1.3/System.Globalization.Extensions.dll"
- ]
- },
- "System.IO/4.1.0": {
- "sha512": "fDY/S3SmZzfGOoamBtl9zIWy8l5tyy9DoHWqa5kOltjZKt/pU5BV/cujiLDTIt06yutMlZ0IbXoKfQ0icMzCDA==",
- "type": "package",
- "path": "System.IO/4.1.0",
- "files": [
- "System.IO.4.1.0.nupkg.sha512",
- "System.IO.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.IO.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.IO.dll",
- "ref/netcore50/System.IO.dll",
- "ref/netcore50/System.IO.xml",
- "ref/netcore50/de/System.IO.xml",
- "ref/netcore50/es/System.IO.xml",
- "ref/netcore50/fr/System.IO.xml",
- "ref/netcore50/it/System.IO.xml",
- "ref/netcore50/ja/System.IO.xml",
- "ref/netcore50/ko/System.IO.xml",
- "ref/netcore50/ru/System.IO.xml",
- "ref/netcore50/zh-hans/System.IO.xml",
- "ref/netcore50/zh-hant/System.IO.xml",
- "ref/netstandard1.0/System.IO.dll",
- "ref/netstandard1.0/System.IO.xml",
- "ref/netstandard1.0/de/System.IO.xml",
- "ref/netstandard1.0/es/System.IO.xml",
- "ref/netstandard1.0/fr/System.IO.xml",
- "ref/netstandard1.0/it/System.IO.xml",
- "ref/netstandard1.0/ja/System.IO.xml",
- "ref/netstandard1.0/ko/System.IO.xml",
- "ref/netstandard1.0/ru/System.IO.xml",
- "ref/netstandard1.0/zh-hans/System.IO.xml",
- "ref/netstandard1.0/zh-hant/System.IO.xml",
- "ref/netstandard1.3/System.IO.dll",
- "ref/netstandard1.3/System.IO.xml",
- "ref/netstandard1.3/de/System.IO.xml",
- "ref/netstandard1.3/es/System.IO.xml",
- "ref/netstandard1.3/fr/System.IO.xml",
- "ref/netstandard1.3/it/System.IO.xml",
- "ref/netstandard1.3/ja/System.IO.xml",
- "ref/netstandard1.3/ko/System.IO.xml",
- "ref/netstandard1.3/ru/System.IO.xml",
- "ref/netstandard1.3/zh-hans/System.IO.xml",
- "ref/netstandard1.3/zh-hant/System.IO.xml",
- "ref/netstandard1.5/System.IO.dll",
- "ref/netstandard1.5/System.IO.xml",
- "ref/netstandard1.5/de/System.IO.xml",
- "ref/netstandard1.5/es/System.IO.xml",
- "ref/netstandard1.5/fr/System.IO.xml",
- "ref/netstandard1.5/it/System.IO.xml",
- "ref/netstandard1.5/ja/System.IO.xml",
- "ref/netstandard1.5/ko/System.IO.xml",
- "ref/netstandard1.5/ru/System.IO.xml",
- "ref/netstandard1.5/zh-hans/System.IO.xml",
- "ref/netstandard1.5/zh-hant/System.IO.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.IO.Compression/4.1.0": {
- "sha512": "1UPUauRB+MyeHKnf8gwc2WtP4VVEHFJ3hwW3UGQvlhbIiYez6Xgp8Yfda6NpLTTyR+pkCZg5qjSMWCn+UiKF6w==",
- "type": "package",
- "path": "System.IO.Compression/4.1.0",
- "files": [
- "System.IO.Compression.4.1.0.nupkg.sha512",
- "System.IO.Compression.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net46/System.IO.Compression.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net46/System.IO.Compression.dll",
- "ref/netcore50/System.IO.Compression.dll",
- "ref/netcore50/System.IO.Compression.xml",
- "ref/netcore50/de/System.IO.Compression.xml",
- "ref/netcore50/es/System.IO.Compression.xml",
- "ref/netcore50/fr/System.IO.Compression.xml",
- "ref/netcore50/it/System.IO.Compression.xml",
- "ref/netcore50/ja/System.IO.Compression.xml",
- "ref/netcore50/ko/System.IO.Compression.xml",
- "ref/netcore50/ru/System.IO.Compression.xml",
- "ref/netcore50/zh-hans/System.IO.Compression.xml",
- "ref/netcore50/zh-hant/System.IO.Compression.xml",
- "ref/netstandard1.1/System.IO.Compression.dll",
- "ref/netstandard1.1/System.IO.Compression.xml",
- "ref/netstandard1.1/de/System.IO.Compression.xml",
- "ref/netstandard1.1/es/System.IO.Compression.xml",
- "ref/netstandard1.1/fr/System.IO.Compression.xml",
- "ref/netstandard1.1/it/System.IO.Compression.xml",
- "ref/netstandard1.1/ja/System.IO.Compression.xml",
- "ref/netstandard1.1/ko/System.IO.Compression.xml",
- "ref/netstandard1.1/ru/System.IO.Compression.xml",
- "ref/netstandard1.1/zh-hans/System.IO.Compression.xml",
- "ref/netstandard1.1/zh-hant/System.IO.Compression.xml",
- "ref/netstandard1.3/System.IO.Compression.dll",
- "ref/netstandard1.3/System.IO.Compression.xml",
- "ref/netstandard1.3/de/System.IO.Compression.xml",
- "ref/netstandard1.3/es/System.IO.Compression.xml",
- "ref/netstandard1.3/fr/System.IO.Compression.xml",
- "ref/netstandard1.3/it/System.IO.Compression.xml",
- "ref/netstandard1.3/ja/System.IO.Compression.xml",
- "ref/netstandard1.3/ko/System.IO.Compression.xml",
- "ref/netstandard1.3/ru/System.IO.Compression.xml",
- "ref/netstandard1.3/zh-hans/System.IO.Compression.xml",
- "ref/netstandard1.3/zh-hant/System.IO.Compression.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll",
- "runtimes/win/lib/net46/System.IO.Compression.dll",
- "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll"
- ]
- },
- "System.IO.Compression.ZipFile/4.0.1": {
- "sha512": "Lm36G8QNfncuHx/WX3NqYbcgytLom5i252He3gziUOJH/4bV1OpQ7iYYUPHDIW3BG3Uu2SaGrXS5F3BOP4/51A==",
- "type": "package",
- "path": "System.IO.Compression.ZipFile/4.0.1",
- "files": [
- "System.IO.Compression.ZipFile.4.0.1.nupkg.sha512",
- "System.IO.Compression.ZipFile.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.Compression.ZipFile.dll",
- "lib/netstandard1.3/System.IO.Compression.ZipFile.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.Compression.ZipFile.dll",
- "ref/netstandard1.3/System.IO.Compression.ZipFile.dll",
- "ref/netstandard1.3/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/de/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/es/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/fr/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/it/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/ja/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/ko/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/ru/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/zh-hans/System.IO.Compression.ZipFile.xml",
- "ref/netstandard1.3/zh-hant/System.IO.Compression.ZipFile.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.IO.FileSystem/4.0.1": {
- "sha512": "HFpllN5lfzCcaLxzYHkq7P3XITywUOQ7uEbGObhdO5MHBjzPd+ebk4G2NnQUEIdLA+LBvkV7UHMUoSB00mwm9w==",
- "type": "package",
- "path": "System.IO.FileSystem/4.0.1",
- "files": [
- "System.IO.FileSystem.4.0.1.nupkg.sha512",
- "System.IO.FileSystem.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.FileSystem.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.FileSystem.dll",
- "ref/netstandard1.3/System.IO.FileSystem.dll",
- "ref/netstandard1.3/System.IO.FileSystem.xml",
- "ref/netstandard1.3/de/System.IO.FileSystem.xml",
- "ref/netstandard1.3/es/System.IO.FileSystem.xml",
- "ref/netstandard1.3/fr/System.IO.FileSystem.xml",
- "ref/netstandard1.3/it/System.IO.FileSystem.xml",
- "ref/netstandard1.3/ja/System.IO.FileSystem.xml",
- "ref/netstandard1.3/ko/System.IO.FileSystem.xml",
- "ref/netstandard1.3/ru/System.IO.FileSystem.xml",
- "ref/netstandard1.3/zh-hans/System.IO.FileSystem.xml",
- "ref/netstandard1.3/zh-hant/System.IO.FileSystem.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.IO.FileSystem.Primitives/4.0.1": {
- "sha512": "fXuPsJnvdzhn7a6Ac6Zx0cLTa9FjU44xhVLGIxmAwcYFlr/OG8BGoEIeqxbiDMHWP3Q6nEKcgjPmfAPp6KwHdQ==",
- "type": "package",
- "path": "System.IO.FileSystem.Primitives/4.0.1",
- "files": [
- "System.IO.FileSystem.Primitives.4.0.1.nupkg.sha512",
- "System.IO.FileSystem.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.FileSystem.Primitives.dll",
- "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.FileSystem.Primitives.dll",
- "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll",
- "ref/netstandard1.3/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/de/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/es/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/fr/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/it/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/ja/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/ko/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/ru/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/zh-hans/System.IO.FileSystem.Primitives.xml",
- "ref/netstandard1.3/zh-hant/System.IO.FileSystem.Primitives.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.IO.FileSystem.Watcher/4.0.0": {
- "sha512": "/fC9hfjVJfj68AoVj0pS30/IjByEz+7QctNGG3KYh0ISdFgU9XreDNCXrGPmq8mzxfWqQbRRoS+4fEAwRDaKWw==",
- "type": "package",
- "path": "System.IO.FileSystem.Watcher/4.0.0",
- "files": [
- "System.IO.FileSystem.Watcher.4.0.0.nupkg.sha512",
- "System.IO.FileSystem.Watcher.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.FileSystem.Watcher.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.FileSystem.Watcher.dll",
- "ref/netstandard1.3/System.IO.FileSystem.Watcher.dll",
- "ref/netstandard1.3/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/de/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/es/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/fr/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/it/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/ja/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/ko/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/ru/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/zh-hans/System.IO.FileSystem.Watcher.xml",
- "ref/netstandard1.3/zh-hant/System.IO.FileSystem.Watcher.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/linux/lib/netstandard1.3/System.IO.FileSystem.Watcher.dll",
- "runtimes/osx/lib/netstandard1.3/System.IO.FileSystem.Watcher.dll",
- "runtimes/win/lib/net46/System.IO.FileSystem.Watcher.dll",
- "runtimes/win/lib/netstandard1.3/System.IO.FileSystem.Watcher.dll",
- "runtimes/win7/lib/netcore50/_._"
- ]
- },
- "System.IO.MemoryMappedFiles/4.0.0": {
- "sha512": "fgdb0TbtVwr7++pJzJUSSTmEQVVYeHs578IxnKkUjdJ0ZGqsLHJ+4ESZ7PB+Q7BHIv2Iw5LHQow1E0n9LfoJUQ==",
- "type": "package",
- "path": "System.IO.MemoryMappedFiles/4.0.0",
- "files": [
- "System.IO.MemoryMappedFiles.4.0.0.nupkg.sha512",
- "System.IO.MemoryMappedFiles.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.MemoryMappedFiles.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.MemoryMappedFiles.dll",
- "ref/netstandard1.3/System.IO.MemoryMappedFiles.dll",
- "ref/netstandard1.3/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/de/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/es/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/fr/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/it/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/ja/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/ko/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/ru/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/zh-hans/System.IO.MemoryMappedFiles.xml",
- "ref/netstandard1.3/zh-hant/System.IO.MemoryMappedFiles.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.IO.MemoryMappedFiles.dll",
- "runtimes/win/lib/net46/System.IO.MemoryMappedFiles.dll",
- "runtimes/win/lib/netcore50/System.IO.MemoryMappedFiles.dll",
- "runtimes/win/lib/netstandard1.3/System.IO.MemoryMappedFiles.dll"
- ]
- },
- "System.IO.UnmanagedMemoryStream/4.0.1": {
- "sha512": "ZymchmVl1tFgDC2j4MHXgtKwUmoKeJ5csVxsBT6HxHJhlpaGUwJJtp+sTWS1XlPvBTMJvLv0MUBFssDbKxWEEg==",
- "type": "package",
- "path": "System.IO.UnmanagedMemoryStream/4.0.1",
- "files": [
- "System.IO.UnmanagedMemoryStream.4.0.1.nupkg.sha512",
- "System.IO.UnmanagedMemoryStream.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.IO.UnmanagedMemoryStream.dll",
- "lib/netstandard1.3/System.IO.UnmanagedMemoryStream.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.IO.UnmanagedMemoryStream.dll",
- "ref/netstandard1.3/System.IO.UnmanagedMemoryStream.dll",
- "ref/netstandard1.3/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/de/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/es/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/fr/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/it/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/ja/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/ko/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/ru/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/zh-hans/System.IO.UnmanagedMemoryStream.xml",
- "ref/netstandard1.3/zh-hant/System.IO.UnmanagedMemoryStream.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Linq/4.1.0": {
- "sha512": "0RdoPVXle4lmjVjAvHeo1SjvnjXOTczTRBJF+XMWZma6R0XU8z4dvDDJby+lDtUblE0MmXgUXrqLMWwS5kriLA==",
- "type": "package",
- "path": "System.Linq/4.1.0",
- "files": [
- "System.Linq.4.1.0.nupkg.sha512",
- "System.Linq.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net463/System.Linq.dll",
- "lib/netcore50/System.Linq.dll",
- "lib/netstandard1.6/System.Linq.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net463/System.Linq.dll",
- "ref/netcore50/System.Linq.dll",
- "ref/netcore50/System.Linq.xml",
- "ref/netcore50/de/System.Linq.xml",
- "ref/netcore50/es/System.Linq.xml",
- "ref/netcore50/fr/System.Linq.xml",
- "ref/netcore50/it/System.Linq.xml",
- "ref/netcore50/ja/System.Linq.xml",
- "ref/netcore50/ko/System.Linq.xml",
- "ref/netcore50/ru/System.Linq.xml",
- "ref/netcore50/zh-hans/System.Linq.xml",
- "ref/netcore50/zh-hant/System.Linq.xml",
- "ref/netstandard1.0/System.Linq.dll",
- "ref/netstandard1.0/System.Linq.xml",
- "ref/netstandard1.0/de/System.Linq.xml",
- "ref/netstandard1.0/es/System.Linq.xml",
- "ref/netstandard1.0/fr/System.Linq.xml",
- "ref/netstandard1.0/it/System.Linq.xml",
- "ref/netstandard1.0/ja/System.Linq.xml",
- "ref/netstandard1.0/ko/System.Linq.xml",
- "ref/netstandard1.0/ru/System.Linq.xml",
- "ref/netstandard1.0/zh-hans/System.Linq.xml",
- "ref/netstandard1.0/zh-hant/System.Linq.xml",
- "ref/netstandard1.6/System.Linq.dll",
- "ref/netstandard1.6/System.Linq.xml",
- "ref/netstandard1.6/de/System.Linq.xml",
- "ref/netstandard1.6/es/System.Linq.xml",
- "ref/netstandard1.6/fr/System.Linq.xml",
- "ref/netstandard1.6/it/System.Linq.xml",
- "ref/netstandard1.6/ja/System.Linq.xml",
- "ref/netstandard1.6/ko/System.Linq.xml",
- "ref/netstandard1.6/ru/System.Linq.xml",
- "ref/netstandard1.6/zh-hans/System.Linq.xml",
- "ref/netstandard1.6/zh-hant/System.Linq.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Linq.Expressions/4.1.0": {
- "sha512": "DcR/TsucSdvUaD2+2AyH5OhEXMLvt1z1EFtR3DjapY/zQWf1/jMbZLh/WbrzxhYhmrWB1/5sWs1kdc3Q+g1SEg==",
- "type": "package",
- "path": "System.Linq.Expressions/4.1.0",
- "files": [
- "System.Linq.Expressions.4.1.0.nupkg.sha512",
- "System.Linq.Expressions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net463/System.Linq.Expressions.dll",
- "lib/netcore50/System.Linq.Expressions.dll",
- "lib/netstandard1.6/System.Linq.Expressions.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net463/System.Linq.Expressions.dll",
- "ref/netcore50/System.Linq.Expressions.dll",
- "ref/netcore50/System.Linq.Expressions.xml",
- "ref/netcore50/de/System.Linq.Expressions.xml",
- "ref/netcore50/es/System.Linq.Expressions.xml",
- "ref/netcore50/fr/System.Linq.Expressions.xml",
- "ref/netcore50/it/System.Linq.Expressions.xml",
- "ref/netcore50/ja/System.Linq.Expressions.xml",
- "ref/netcore50/ko/System.Linq.Expressions.xml",
- "ref/netcore50/ru/System.Linq.Expressions.xml",
- "ref/netcore50/zh-hans/System.Linq.Expressions.xml",
- "ref/netcore50/zh-hant/System.Linq.Expressions.xml",
- "ref/netstandard1.0/System.Linq.Expressions.dll",
- "ref/netstandard1.0/System.Linq.Expressions.xml",
- "ref/netstandard1.0/de/System.Linq.Expressions.xml",
- "ref/netstandard1.0/es/System.Linq.Expressions.xml",
- "ref/netstandard1.0/fr/System.Linq.Expressions.xml",
- "ref/netstandard1.0/it/System.Linq.Expressions.xml",
- "ref/netstandard1.0/ja/System.Linq.Expressions.xml",
- "ref/netstandard1.0/ko/System.Linq.Expressions.xml",
- "ref/netstandard1.0/ru/System.Linq.Expressions.xml",
- "ref/netstandard1.0/zh-hans/System.Linq.Expressions.xml",
- "ref/netstandard1.0/zh-hant/System.Linq.Expressions.xml",
- "ref/netstandard1.3/System.Linq.Expressions.dll",
- "ref/netstandard1.3/System.Linq.Expressions.xml",
- "ref/netstandard1.3/de/System.Linq.Expressions.xml",
- "ref/netstandard1.3/es/System.Linq.Expressions.xml",
- "ref/netstandard1.3/fr/System.Linq.Expressions.xml",
- "ref/netstandard1.3/it/System.Linq.Expressions.xml",
- "ref/netstandard1.3/ja/System.Linq.Expressions.xml",
- "ref/netstandard1.3/ko/System.Linq.Expressions.xml",
- "ref/netstandard1.3/ru/System.Linq.Expressions.xml",
- "ref/netstandard1.3/zh-hans/System.Linq.Expressions.xml",
- "ref/netstandard1.3/zh-hant/System.Linq.Expressions.xml",
- "ref/netstandard1.6/System.Linq.Expressions.dll",
- "ref/netstandard1.6/System.Linq.Expressions.xml",
- "ref/netstandard1.6/de/System.Linq.Expressions.xml",
- "ref/netstandard1.6/es/System.Linq.Expressions.xml",
- "ref/netstandard1.6/fr/System.Linq.Expressions.xml",
- "ref/netstandard1.6/it/System.Linq.Expressions.xml",
- "ref/netstandard1.6/ja/System.Linq.Expressions.xml",
- "ref/netstandard1.6/ko/System.Linq.Expressions.xml",
- "ref/netstandard1.6/ru/System.Linq.Expressions.xml",
- "ref/netstandard1.6/zh-hans/System.Linq.Expressions.xml",
- "ref/netstandard1.6/zh-hant/System.Linq.Expressions.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Linq.Expressions.dll"
- ]
- },
- "System.Linq.Parallel/4.0.1": {
- "sha512": "CMzKovrTe0CFg6dBMO6J3tkeEh5Lu51jsammXx/VBZtEwOBMh81vPzaOIsvUeCXjVmDkNeAiGkJhSOFQJ+n9aw==",
- "type": "package",
- "path": "System.Linq.Parallel/4.0.1",
- "files": [
- "System.Linq.Parallel.4.0.1.nupkg.sha512",
- "System.Linq.Parallel.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Linq.Parallel.dll",
- "lib/netstandard1.3/System.Linq.Parallel.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Linq.Parallel.dll",
- "ref/netcore50/System.Linq.Parallel.xml",
- "ref/netcore50/de/System.Linq.Parallel.xml",
- "ref/netcore50/es/System.Linq.Parallel.xml",
- "ref/netcore50/fr/System.Linq.Parallel.xml",
- "ref/netcore50/it/System.Linq.Parallel.xml",
- "ref/netcore50/ja/System.Linq.Parallel.xml",
- "ref/netcore50/ko/System.Linq.Parallel.xml",
- "ref/netcore50/ru/System.Linq.Parallel.xml",
- "ref/netcore50/zh-hans/System.Linq.Parallel.xml",
- "ref/netcore50/zh-hant/System.Linq.Parallel.xml",
- "ref/netstandard1.1/System.Linq.Parallel.dll",
- "ref/netstandard1.1/System.Linq.Parallel.xml",
- "ref/netstandard1.1/de/System.Linq.Parallel.xml",
- "ref/netstandard1.1/es/System.Linq.Parallel.xml",
- "ref/netstandard1.1/fr/System.Linq.Parallel.xml",
- "ref/netstandard1.1/it/System.Linq.Parallel.xml",
- "ref/netstandard1.1/ja/System.Linq.Parallel.xml",
- "ref/netstandard1.1/ko/System.Linq.Parallel.xml",
- "ref/netstandard1.1/ru/System.Linq.Parallel.xml",
- "ref/netstandard1.1/zh-hans/System.Linq.Parallel.xml",
- "ref/netstandard1.1/zh-hant/System.Linq.Parallel.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Linq.Queryable/4.0.1": {
- "sha512": "4Pgfj37LCCuwta+3owsNvL2UyveRUrW1YCthfdlGR27C6wtOwhpUFnOCDIQKbh1Cwl2fOztktRO3NQsRiVRXWQ==",
- "type": "package",
- "path": "System.Linq.Queryable/4.0.1",
- "files": [
- "System.Linq.Queryable.4.0.1.nupkg.sha512",
- "System.Linq.Queryable.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/monoandroid10/_._",
- "lib/monotouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Linq.Queryable.dll",
- "lib/netstandard1.3/System.Linq.Queryable.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/monoandroid10/_._",
- "ref/monotouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Linq.Queryable.dll",
- "ref/netcore50/System.Linq.Queryable.xml",
- "ref/netcore50/de/System.Linq.Queryable.xml",
- "ref/netcore50/es/System.Linq.Queryable.xml",
- "ref/netcore50/fr/System.Linq.Queryable.xml",
- "ref/netcore50/it/System.Linq.Queryable.xml",
- "ref/netcore50/ja/System.Linq.Queryable.xml",
- "ref/netcore50/ko/System.Linq.Queryable.xml",
- "ref/netcore50/ru/System.Linq.Queryable.xml",
- "ref/netcore50/zh-hans/System.Linq.Queryable.xml",
- "ref/netcore50/zh-hant/System.Linq.Queryable.xml",
- "ref/netstandard1.0/System.Linq.Queryable.dll",
- "ref/netstandard1.0/System.Linq.Queryable.xml",
- "ref/netstandard1.0/de/System.Linq.Queryable.xml",
- "ref/netstandard1.0/es/System.Linq.Queryable.xml",
- "ref/netstandard1.0/fr/System.Linq.Queryable.xml",
- "ref/netstandard1.0/it/System.Linq.Queryable.xml",
- "ref/netstandard1.0/ja/System.Linq.Queryable.xml",
- "ref/netstandard1.0/ko/System.Linq.Queryable.xml",
- "ref/netstandard1.0/ru/System.Linq.Queryable.xml",
- "ref/netstandard1.0/zh-hans/System.Linq.Queryable.xml",
- "ref/netstandard1.0/zh-hant/System.Linq.Queryable.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Net.Http/4.1.0": {
- "sha512": "hZn7QMba3OTd0fWhtDpk6Ah/+486/XfPgLf40z31VLaHAMUOxmK4cmO/G50hNoViuM4BrSUl5MxfWWl7qrIENw==",
- "type": "package",
- "path": "System.Net.Http/4.1.0",
- "files": [
- "System.Net.Http.4.1.0.nupkg.sha512",
- "System.Net.Http.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/Xamarinmac20/_._",
- "lib/monoandroid10/_._",
- "lib/monotouch10/_._",
- "lib/net45/_._",
- "lib/net46/System.Net.Http.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/Xamarinmac20/_._",
- "ref/monoandroid10/_._",
- "ref/monotouch10/_._",
- "ref/net45/_._",
- "ref/net46/System.Net.Http.dll",
- "ref/net46/System.Net.Http.xml",
- "ref/net46/de/System.Net.Http.xml",
- "ref/net46/es/System.Net.Http.xml",
- "ref/net46/fr/System.Net.Http.xml",
- "ref/net46/it/System.Net.Http.xml",
- "ref/net46/ja/System.Net.Http.xml",
- "ref/net46/ko/System.Net.Http.xml",
- "ref/net46/ru/System.Net.Http.xml",
- "ref/net46/zh-hans/System.Net.Http.xml",
- "ref/net46/zh-hant/System.Net.Http.xml",
- "ref/netcore50/System.Net.Http.dll",
- "ref/netcore50/System.Net.Http.xml",
- "ref/netcore50/de/System.Net.Http.xml",
- "ref/netcore50/es/System.Net.Http.xml",
- "ref/netcore50/fr/System.Net.Http.xml",
- "ref/netcore50/it/System.Net.Http.xml",
- "ref/netcore50/ja/System.Net.Http.xml",
- "ref/netcore50/ko/System.Net.Http.xml",
- "ref/netcore50/ru/System.Net.Http.xml",
- "ref/netcore50/zh-hans/System.Net.Http.xml",
- "ref/netcore50/zh-hant/System.Net.Http.xml",
- "ref/netstandard1.1/System.Net.Http.dll",
- "ref/netstandard1.1/System.Net.Http.xml",
- "ref/netstandard1.1/de/System.Net.Http.xml",
- "ref/netstandard1.1/es/System.Net.Http.xml",
- "ref/netstandard1.1/fr/System.Net.Http.xml",
- "ref/netstandard1.1/it/System.Net.Http.xml",
- "ref/netstandard1.1/ja/System.Net.Http.xml",
- "ref/netstandard1.1/ko/System.Net.Http.xml",
- "ref/netstandard1.1/ru/System.Net.Http.xml",
- "ref/netstandard1.1/zh-hans/System.Net.Http.xml",
- "ref/netstandard1.1/zh-hant/System.Net.Http.xml",
- "ref/netstandard1.3/System.Net.Http.dll",
- "ref/netstandard1.3/System.Net.Http.xml",
- "ref/netstandard1.3/de/System.Net.Http.xml",
- "ref/netstandard1.3/es/System.Net.Http.xml",
- "ref/netstandard1.3/fr/System.Net.Http.xml",
- "ref/netstandard1.3/it/System.Net.Http.xml",
- "ref/netstandard1.3/ja/System.Net.Http.xml",
- "ref/netstandard1.3/ko/System.Net.Http.xml",
- "ref/netstandard1.3/ru/System.Net.Http.xml",
- "ref/netstandard1.3/zh-hans/System.Net.Http.xml",
- "ref/netstandard1.3/zh-hant/System.Net.Http.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.6/System.Net.Http.dll",
- "runtimes/win/lib/net46/System.Net.Http.dll",
- "runtimes/win/lib/netcore50/System.Net.Http.dll",
- "runtimes/win/lib/netstandard1.3/System.Net.Http.dll"
- ]
- },
- "System.Net.NameResolution/4.0.0": {
- "sha512": "iyHWj7OuudyxU1+Ahv8IoJNI1ZjrAfPmd1MBs16U41ZZqOAM6gRSrbvBadWaPvc7EOG0MfYry/DumOuQrpoLBQ==",
- "type": "package",
- "path": "System.Net.NameResolution/4.0.0",
- "files": [
- "System.Net.NameResolution.4.0.0.nupkg.sha512",
- "System.Net.NameResolution.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Net.NameResolution.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Net.NameResolution.dll",
- "ref/netstandard1.3/System.Net.NameResolution.dll",
- "ref/netstandard1.3/System.Net.NameResolution.xml",
- "ref/netstandard1.3/de/System.Net.NameResolution.xml",
- "ref/netstandard1.3/es/System.Net.NameResolution.xml",
- "ref/netstandard1.3/fr/System.Net.NameResolution.xml",
- "ref/netstandard1.3/it/System.Net.NameResolution.xml",
- "ref/netstandard1.3/ja/System.Net.NameResolution.xml",
- "ref/netstandard1.3/ko/System.Net.NameResolution.xml",
- "ref/netstandard1.3/ru/System.Net.NameResolution.xml",
- "ref/netstandard1.3/zh-hans/System.Net.NameResolution.xml",
- "ref/netstandard1.3/zh-hant/System.Net.NameResolution.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Net.NameResolution.dll",
- "runtimes/win/lib/net46/System.Net.NameResolution.dll",
- "runtimes/win/lib/netcore50/System.Net.NameResolution.dll",
- "runtimes/win/lib/netstandard1.3/System.Net.NameResolution.dll"
- ]
- },
- "System.Net.Primitives/4.0.11": {
- "sha512": "KcZbYrq47rmbU8cHr9HxofO3ls/w0wvZBflGG7IwhVz29YSl1iJRI0SQJ9wkh6cSmpt/7HPKFQIbzjNpwGxUhg==",
- "type": "package",
- "path": "System.Net.Primitives/4.0.11",
- "files": [
- "System.Net.Primitives.4.0.11.nupkg.sha512",
- "System.Net.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Net.Primitives.dll",
- "ref/netcore50/System.Net.Primitives.xml",
- "ref/netcore50/de/System.Net.Primitives.xml",
- "ref/netcore50/es/System.Net.Primitives.xml",
- "ref/netcore50/fr/System.Net.Primitives.xml",
- "ref/netcore50/it/System.Net.Primitives.xml",
- "ref/netcore50/ja/System.Net.Primitives.xml",
- "ref/netcore50/ko/System.Net.Primitives.xml",
- "ref/netcore50/ru/System.Net.Primitives.xml",
- "ref/netcore50/zh-hans/System.Net.Primitives.xml",
- "ref/netcore50/zh-hant/System.Net.Primitives.xml",
- "ref/netstandard1.0/System.Net.Primitives.dll",
- "ref/netstandard1.0/System.Net.Primitives.xml",
- "ref/netstandard1.0/de/System.Net.Primitives.xml",
- "ref/netstandard1.0/es/System.Net.Primitives.xml",
- "ref/netstandard1.0/fr/System.Net.Primitives.xml",
- "ref/netstandard1.0/it/System.Net.Primitives.xml",
- "ref/netstandard1.0/ja/System.Net.Primitives.xml",
- "ref/netstandard1.0/ko/System.Net.Primitives.xml",
- "ref/netstandard1.0/ru/System.Net.Primitives.xml",
- "ref/netstandard1.0/zh-hans/System.Net.Primitives.xml",
- "ref/netstandard1.0/zh-hant/System.Net.Primitives.xml",
- "ref/netstandard1.1/System.Net.Primitives.dll",
- "ref/netstandard1.1/System.Net.Primitives.xml",
- "ref/netstandard1.1/de/System.Net.Primitives.xml",
- "ref/netstandard1.1/es/System.Net.Primitives.xml",
- "ref/netstandard1.1/fr/System.Net.Primitives.xml",
- "ref/netstandard1.1/it/System.Net.Primitives.xml",
- "ref/netstandard1.1/ja/System.Net.Primitives.xml",
- "ref/netstandard1.1/ko/System.Net.Primitives.xml",
- "ref/netstandard1.1/ru/System.Net.Primitives.xml",
- "ref/netstandard1.1/zh-hans/System.Net.Primitives.xml",
- "ref/netstandard1.1/zh-hant/System.Net.Primitives.xml",
- "ref/netstandard1.3/System.Net.Primitives.dll",
- "ref/netstandard1.3/System.Net.Primitives.xml",
- "ref/netstandard1.3/de/System.Net.Primitives.xml",
- "ref/netstandard1.3/es/System.Net.Primitives.xml",
- "ref/netstandard1.3/fr/System.Net.Primitives.xml",
- "ref/netstandard1.3/it/System.Net.Primitives.xml",
- "ref/netstandard1.3/ja/System.Net.Primitives.xml",
- "ref/netstandard1.3/ko/System.Net.Primitives.xml",
- "ref/netstandard1.3/ru/System.Net.Primitives.xml",
- "ref/netstandard1.3/zh-hans/System.Net.Primitives.xml",
- "ref/netstandard1.3/zh-hant/System.Net.Primitives.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Net.Requests/4.0.11": {
- "sha512": "qyURRKYbqPZaqqYn9cmtJn/iByemgah6Y93Vs1+ZX6sOFM7Ttsrc4Fl6SkPGNK+CuulKU4xf1fZW+6YenAUIfw==",
- "type": "package",
- "path": "System.Net.Requests/4.0.11",
- "files": [
- "System.Net.Requests.4.0.11.nupkg.sha512",
- "System.Net.Requests.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net46/_._",
- "ref/netcore50/System.Net.Requests.dll",
- "ref/netcore50/System.Net.Requests.xml",
- "ref/netcore50/de/System.Net.Requests.xml",
- "ref/netcore50/es/System.Net.Requests.xml",
- "ref/netcore50/fr/System.Net.Requests.xml",
- "ref/netcore50/it/System.Net.Requests.xml",
- "ref/netcore50/ja/System.Net.Requests.xml",
- "ref/netcore50/ko/System.Net.Requests.xml",
- "ref/netcore50/ru/System.Net.Requests.xml",
- "ref/netcore50/zh-hans/System.Net.Requests.xml",
- "ref/netcore50/zh-hant/System.Net.Requests.xml",
- "ref/netstandard1.0/System.Net.Requests.dll",
- "ref/netstandard1.0/System.Net.Requests.xml",
- "ref/netstandard1.0/de/System.Net.Requests.xml",
- "ref/netstandard1.0/es/System.Net.Requests.xml",
- "ref/netstandard1.0/fr/System.Net.Requests.xml",
- "ref/netstandard1.0/it/System.Net.Requests.xml",
- "ref/netstandard1.0/ja/System.Net.Requests.xml",
- "ref/netstandard1.0/ko/System.Net.Requests.xml",
- "ref/netstandard1.0/ru/System.Net.Requests.xml",
- "ref/netstandard1.0/zh-hans/System.Net.Requests.xml",
- "ref/netstandard1.0/zh-hant/System.Net.Requests.xml",
- "ref/netstandard1.1/System.Net.Requests.dll",
- "ref/netstandard1.1/System.Net.Requests.xml",
- "ref/netstandard1.1/de/System.Net.Requests.xml",
- "ref/netstandard1.1/es/System.Net.Requests.xml",
- "ref/netstandard1.1/fr/System.Net.Requests.xml",
- "ref/netstandard1.1/it/System.Net.Requests.xml",
- "ref/netstandard1.1/ja/System.Net.Requests.xml",
- "ref/netstandard1.1/ko/System.Net.Requests.xml",
- "ref/netstandard1.1/ru/System.Net.Requests.xml",
- "ref/netstandard1.1/zh-hans/System.Net.Requests.xml",
- "ref/netstandard1.1/zh-hant/System.Net.Requests.xml",
- "ref/netstandard1.3/System.Net.Requests.dll",
- "ref/netstandard1.3/System.Net.Requests.xml",
- "ref/netstandard1.3/de/System.Net.Requests.xml",
- "ref/netstandard1.3/es/System.Net.Requests.xml",
- "ref/netstandard1.3/fr/System.Net.Requests.xml",
- "ref/netstandard1.3/it/System.Net.Requests.xml",
- "ref/netstandard1.3/ja/System.Net.Requests.xml",
- "ref/netstandard1.3/ko/System.Net.Requests.xml",
- "ref/netstandard1.3/ru/System.Net.Requests.xml",
- "ref/netstandard1.3/zh-hans/System.Net.Requests.xml",
- "ref/netstandard1.3/zh-hant/System.Net.Requests.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Net.Requests.dll",
- "runtimes/win/lib/net46/_._",
- "runtimes/win/lib/netstandard1.3/System.Net.Requests.dll"
- ]
- },
- "System.Net.Security/4.0.0": {
- "sha512": "O5pmYZ0bsJzRP3lxvO6HZWjvBBKkhNRUI/UQReeDo9cvvfNuhBamZkAbaQTZRYOk+JsDzfpDrkqfglgeI9VhpQ==",
- "type": "package",
- "path": "System.Net.Security/4.0.0",
- "files": [
- "System.Net.Security.4.0.0.nupkg.sha512",
- "System.Net.Security.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Net.Security.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Net.Security.dll",
- "ref/netstandard1.3/System.Net.Security.dll",
- "ref/netstandard1.3/System.Net.Security.xml",
- "ref/netstandard1.3/de/System.Net.Security.xml",
- "ref/netstandard1.3/es/System.Net.Security.xml",
- "ref/netstandard1.3/fr/System.Net.Security.xml",
- "ref/netstandard1.3/it/System.Net.Security.xml",
- "ref/netstandard1.3/ja/System.Net.Security.xml",
- "ref/netstandard1.3/ko/System.Net.Security.xml",
- "ref/netstandard1.3/ru/System.Net.Security.xml",
- "ref/netstandard1.3/zh-hans/System.Net.Security.xml",
- "ref/netstandard1.3/zh-hant/System.Net.Security.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.6/System.Net.Security.dll",
- "runtimes/win/lib/net46/System.Net.Security.dll",
- "runtimes/win/lib/netstandard1.3/System.Net.Security.dll",
- "runtimes/win7/lib/netcore50/_._"
- ]
- },
- "System.Net.Sockets/4.1.0": {
- "sha512": "W2aqTjRs5tn3gNPemzojBcRPFBsnOiIABvwo+b7U82sVcW5JVgWOyewHDr7fdK/EEgJ8j+nrX9L/8sDV6vGLiA==",
- "type": "package",
- "path": "System.Net.Sockets/4.1.0",
- "files": [
- "System.Net.Sockets.4.1.0.nupkg.sha512",
- "System.Net.Sockets.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Net.Sockets.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Net.Sockets.dll",
- "ref/netstandard1.3/System.Net.Sockets.dll",
- "ref/netstandard1.3/System.Net.Sockets.xml",
- "ref/netstandard1.3/de/System.Net.Sockets.xml",
- "ref/netstandard1.3/es/System.Net.Sockets.xml",
- "ref/netstandard1.3/fr/System.Net.Sockets.xml",
- "ref/netstandard1.3/it/System.Net.Sockets.xml",
- "ref/netstandard1.3/ja/System.Net.Sockets.xml",
- "ref/netstandard1.3/ko/System.Net.Sockets.xml",
- "ref/netstandard1.3/ru/System.Net.Sockets.xml",
- "ref/netstandard1.3/zh-hans/System.Net.Sockets.xml",
- "ref/netstandard1.3/zh-hant/System.Net.Sockets.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Net.WebHeaderCollection/4.0.1": {
- "sha512": "VWL7cEPrOoR7kfKQqZYpRMllMSdbx7iSCAwODSwRrD3wTC8j4eBp5j7kaxC7D1dg8m9uB/CoF6sAd1UkuSDXFQ==",
- "type": "package",
- "path": "System.Net.WebHeaderCollection/4.0.1",
- "files": [
- "System.Net.WebHeaderCollection.4.0.1.nupkg.sha512",
- "System.Net.WebHeaderCollection.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/_._",
- "lib/netstandard1.3/System.Net.WebHeaderCollection.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/_._",
- "ref/netstandard1.3/System.Net.WebHeaderCollection.dll",
- "ref/netstandard1.3/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/de/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/es/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/fr/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/it/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/ja/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/ko/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/ru/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/zh-hans/System.Net.WebHeaderCollection.xml",
- "ref/netstandard1.3/zh-hant/System.Net.WebHeaderCollection.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Numerics.Vectors/4.1.1": {
- "sha512": "PT1LXaeoOxy6VQi1+lfLpVHlVqSjJsYf2t8iWX49sHUkYUvFwvhIikG02vhbPRyn+oGSxOdR8OjutIO3UzJAhQ==",
- "type": "package",
- "path": "System.Numerics.Vectors/4.1.1",
- "files": [
- "System.Numerics.Vectors.4.1.1.nupkg.sha512",
- "System.Numerics.Vectors.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Numerics.Vectors.dll",
- "lib/net46/System.Numerics.Vectors.xml",
- "lib/netstandard1.0/System.Numerics.Vectors.dll",
- "lib/netstandard1.0/System.Numerics.Vectors.xml",
- "lib/portable-net45+win8+wp8+wpa81/System.Numerics.Vectors.dll",
- "lib/portable-net45+win8+wp8+wpa81/System.Numerics.Vectors.xml",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Numerics.Vectors.dll",
- "ref/net46/System.Numerics.Vectors.xml",
- "ref/netstandard1.0/System.Numerics.Vectors.dll",
- "ref/netstandard1.0/System.Numerics.Vectors.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.ObjectModel/4.0.12": {
- "sha512": "KIgxKSkPPA1dvqK2fyO0Pyktc7aYDRdRsVWtkJE9OaHov6hZKq9UaARTmiEJdQxOIb4znG31rYroTIGU/gGHjw==",
- "type": "package",
- "path": "System.ObjectModel/4.0.12",
- "files": [
- "System.ObjectModel.4.0.12.nupkg.sha512",
- "System.ObjectModel.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.ObjectModel.dll",
- "lib/netstandard1.3/System.ObjectModel.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.ObjectModel.dll",
- "ref/netcore50/System.ObjectModel.xml",
- "ref/netcore50/de/System.ObjectModel.xml",
- "ref/netcore50/es/System.ObjectModel.xml",
- "ref/netcore50/fr/System.ObjectModel.xml",
- "ref/netcore50/it/System.ObjectModel.xml",
- "ref/netcore50/ja/System.ObjectModel.xml",
- "ref/netcore50/ko/System.ObjectModel.xml",
- "ref/netcore50/ru/System.ObjectModel.xml",
- "ref/netcore50/zh-hans/System.ObjectModel.xml",
- "ref/netcore50/zh-hant/System.ObjectModel.xml",
- "ref/netstandard1.0/System.ObjectModel.dll",
- "ref/netstandard1.0/System.ObjectModel.xml",
- "ref/netstandard1.0/de/System.ObjectModel.xml",
- "ref/netstandard1.0/es/System.ObjectModel.xml",
- "ref/netstandard1.0/fr/System.ObjectModel.xml",
- "ref/netstandard1.0/it/System.ObjectModel.xml",
- "ref/netstandard1.0/ja/System.ObjectModel.xml",
- "ref/netstandard1.0/ko/System.ObjectModel.xml",
- "ref/netstandard1.0/ru/System.ObjectModel.xml",
- "ref/netstandard1.0/zh-hans/System.ObjectModel.xml",
- "ref/netstandard1.0/zh-hant/System.ObjectModel.xml",
- "ref/netstandard1.3/System.ObjectModel.dll",
- "ref/netstandard1.3/System.ObjectModel.xml",
- "ref/netstandard1.3/de/System.ObjectModel.xml",
- "ref/netstandard1.3/es/System.ObjectModel.xml",
- "ref/netstandard1.3/fr/System.ObjectModel.xml",
- "ref/netstandard1.3/it/System.ObjectModel.xml",
- "ref/netstandard1.3/ja/System.ObjectModel.xml",
- "ref/netstandard1.3/ko/System.ObjectModel.xml",
- "ref/netstandard1.3/ru/System.ObjectModel.xml",
- "ref/netstandard1.3/zh-hans/System.ObjectModel.xml",
- "ref/netstandard1.3/zh-hant/System.ObjectModel.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Reflection/4.1.0": {
- "sha512": "FFKGlU3SOEK/iuO6Zx424OPXN+Siu6eDoVhDtAoSEbeglWmpxSykqg24Ul0+aXYT6xZIeZVxmESJwjB9OL9t2g==",
- "type": "package",
- "path": "System.Reflection/4.1.0",
- "files": [
- "System.Reflection.4.1.0.nupkg.sha512",
- "System.Reflection.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.Reflection.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.Reflection.dll",
- "ref/netcore50/System.Reflection.dll",
- "ref/netcore50/System.Reflection.xml",
- "ref/netcore50/de/System.Reflection.xml",
- "ref/netcore50/es/System.Reflection.xml",
- "ref/netcore50/fr/System.Reflection.xml",
- "ref/netcore50/it/System.Reflection.xml",
- "ref/netcore50/ja/System.Reflection.xml",
- "ref/netcore50/ko/System.Reflection.xml",
- "ref/netcore50/ru/System.Reflection.xml",
- "ref/netcore50/zh-hans/System.Reflection.xml",
- "ref/netcore50/zh-hant/System.Reflection.xml",
- "ref/netstandard1.0/System.Reflection.dll",
- "ref/netstandard1.0/System.Reflection.xml",
- "ref/netstandard1.0/de/System.Reflection.xml",
- "ref/netstandard1.0/es/System.Reflection.xml",
- "ref/netstandard1.0/fr/System.Reflection.xml",
- "ref/netstandard1.0/it/System.Reflection.xml",
- "ref/netstandard1.0/ja/System.Reflection.xml",
- "ref/netstandard1.0/ko/System.Reflection.xml",
- "ref/netstandard1.0/ru/System.Reflection.xml",
- "ref/netstandard1.0/zh-hans/System.Reflection.xml",
- "ref/netstandard1.0/zh-hant/System.Reflection.xml",
- "ref/netstandard1.3/System.Reflection.dll",
- "ref/netstandard1.3/System.Reflection.xml",
- "ref/netstandard1.3/de/System.Reflection.xml",
- "ref/netstandard1.3/es/System.Reflection.xml",
- "ref/netstandard1.3/fr/System.Reflection.xml",
- "ref/netstandard1.3/it/System.Reflection.xml",
- "ref/netstandard1.3/ja/System.Reflection.xml",
- "ref/netstandard1.3/ko/System.Reflection.xml",
- "ref/netstandard1.3/ru/System.Reflection.xml",
- "ref/netstandard1.3/zh-hans/System.Reflection.xml",
- "ref/netstandard1.3/zh-hant/System.Reflection.xml",
- "ref/netstandard1.5/System.Reflection.dll",
- "ref/netstandard1.5/System.Reflection.xml",
- "ref/netstandard1.5/de/System.Reflection.xml",
- "ref/netstandard1.5/es/System.Reflection.xml",
- "ref/netstandard1.5/fr/System.Reflection.xml",
- "ref/netstandard1.5/it/System.Reflection.xml",
- "ref/netstandard1.5/ja/System.Reflection.xml",
- "ref/netstandard1.5/ko/System.Reflection.xml",
- "ref/netstandard1.5/ru/System.Reflection.xml",
- "ref/netstandard1.5/zh-hans/System.Reflection.xml",
- "ref/netstandard1.5/zh-hant/System.Reflection.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Reflection.DispatchProxy/4.0.1": {
- "sha512": "O81cWVlqW0zOMrl/JHcgFWGUCDaOU9NwOIPYqnxL/pd8RjymYpwfYKsg2+SB5g9UdiIZLR3m6FEDya7iYGCdRg==",
- "type": "package",
- "path": "System.Reflection.DispatchProxy/4.0.1",
- "files": [
- "System.Reflection.DispatchProxy.4.0.1.nupkg.sha512",
- "System.Reflection.DispatchProxy.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/netstandard1.3/System.Reflection.DispatchProxy.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/netstandard1.3/System.Reflection.DispatchProxy.dll",
- "ref/netstandard1.3/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/de/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/es/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/fr/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/it/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/ja/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/ko/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/ru/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/zh-hans/System.Reflection.DispatchProxy.xml",
- "ref/netstandard1.3/zh-hant/System.Reflection.DispatchProxy.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Reflection.DispatchProxy.dll"
- ]
- },
- "System.Reflection.Emit/4.0.1": {
- "sha512": "N5sMd/U2YE6RsSDLJyGLwWQfW3dKw6dDA+PpsBuNAK0zfx6HaR6NS2hLVGUDLFPXaJBC/2I2unrSMF5H8OwGZA==",
- "type": "package",
- "path": "System.Reflection.Emit/4.0.1",
- "files": [
- "System.Reflection.Emit.4.0.1.nupkg.sha512",
- "System.Reflection.Emit.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Reflection.Emit.dll",
- "lib/netstandard1.3/System.Reflection.Emit.dll",
- "lib/xamarinmac20/_._",
- "ref/MonoAndroid10/_._",
- "ref/net45/_._",
- "ref/netstandard1.1/System.Reflection.Emit.dll",
- "ref/netstandard1.1/System.Reflection.Emit.xml",
- "ref/netstandard1.1/de/System.Reflection.Emit.xml",
- "ref/netstandard1.1/es/System.Reflection.Emit.xml",
- "ref/netstandard1.1/fr/System.Reflection.Emit.xml",
- "ref/netstandard1.1/it/System.Reflection.Emit.xml",
- "ref/netstandard1.1/ja/System.Reflection.Emit.xml",
- "ref/netstandard1.1/ko/System.Reflection.Emit.xml",
- "ref/netstandard1.1/ru/System.Reflection.Emit.xml",
- "ref/netstandard1.1/zh-hans/System.Reflection.Emit.xml",
- "ref/netstandard1.1/zh-hant/System.Reflection.Emit.xml",
- "ref/xamarinmac20/_._"
- ]
- },
- "System.Reflection.Emit.ILGeneration/4.0.1": {
- "sha512": "2lEx073cw4oK6yrgCGzunJLChfv4Up0d7Jf0jYi4801n5Ele0xCBq80BUYnOnanAUesnQ7tr7hOy7Erjodm91w==",
- "type": "package",
- "path": "System.Reflection.Emit.ILGeneration/4.0.1",
- "files": [
- "System.Reflection.Emit.ILGeneration.4.0.1.nupkg.sha512",
- "System.Reflection.Emit.ILGeneration.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net45/_._",
- "lib/netcore50/System.Reflection.Emit.ILGeneration.dll",
- "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll",
- "lib/portable-net45+wp8/_._",
- "lib/wp80/_._",
- "ref/net45/_._",
- "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.dll",
- "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/de/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/es/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/fr/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/it/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/ja/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/ko/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/ru/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/zh-hans/System.Reflection.Emit.ILGeneration.xml",
- "ref/netstandard1.0/zh-hant/System.Reflection.Emit.ILGeneration.xml",
- "ref/portable-net45+wp8/_._",
- "ref/wp80/_._",
- "runtimes/aot/lib/netcore50/_._"
- ]
- },
- "System.Reflection.Emit.Lightweight/4.0.1": {
- "sha512": "VAzJsSMNm9zzvE9nPI2jYIxME/E7EgTXAebcL61s0l5KSzvjNQLZBx6FDpdzGo0OWYwm95Z7/WUAQc8Fvv9qXw==",
- "type": "package",
- "path": "System.Reflection.Emit.Lightweight/4.0.1",
- "files": [
- "System.Reflection.Emit.Lightweight.4.0.1.nupkg.sha512",
- "System.Reflection.Emit.Lightweight.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net45/_._",
- "lib/netcore50/System.Reflection.Emit.Lightweight.dll",
- "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll",
- "lib/portable-net45+wp8/_._",
- "lib/wp80/_._",
- "ref/net45/_._",
- "ref/netstandard1.0/System.Reflection.Emit.Lightweight.dll",
- "ref/netstandard1.0/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/de/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/es/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/fr/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/it/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/ja/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/ko/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/ru/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/zh-hans/System.Reflection.Emit.Lightweight.xml",
- "ref/netstandard1.0/zh-hant/System.Reflection.Emit.Lightweight.xml",
- "ref/portable-net45+wp8/_._",
- "ref/wp80/_._",
- "runtimes/aot/lib/netcore50/_._"
- ]
- },
- "System.Reflection.Extensions/4.0.1": {
- "sha512": "7/jRI76NgXghZ7ECDBAJeEu0vY1SXf3hQv9uJXYWsZIO/4Q+uZ7V4geUXaVhwJBvIKYHddbnaiBan6K+1F2o4g==",
- "type": "package",
- "path": "System.Reflection.Extensions/4.0.1",
- "files": [
- "System.Reflection.Extensions.4.0.1.nupkg.sha512",
- "System.Reflection.Extensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Reflection.Extensions.dll",
- "ref/netcore50/System.Reflection.Extensions.xml",
- "ref/netcore50/de/System.Reflection.Extensions.xml",
- "ref/netcore50/es/System.Reflection.Extensions.xml",
- "ref/netcore50/fr/System.Reflection.Extensions.xml",
- "ref/netcore50/it/System.Reflection.Extensions.xml",
- "ref/netcore50/ja/System.Reflection.Extensions.xml",
- "ref/netcore50/ko/System.Reflection.Extensions.xml",
- "ref/netcore50/ru/System.Reflection.Extensions.xml",
- "ref/netcore50/zh-hans/System.Reflection.Extensions.xml",
- "ref/netcore50/zh-hant/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/System.Reflection.Extensions.dll",
- "ref/netstandard1.0/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/de/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/es/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/fr/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/it/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/ja/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/ko/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/ru/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/zh-hans/System.Reflection.Extensions.xml",
- "ref/netstandard1.0/zh-hant/System.Reflection.Extensions.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Reflection.Metadata/1.3.0": {
- "sha512": "S8fpHDmJ2hcKQ/3K4KUyAmviLsFKAK8iEERQVYP7KJw5p9c945nxe5p+qePjvKEye0eZX1jcWRaMArpP8qLoTg==",
- "type": "package",
- "path": "System.Reflection.Metadata/1.3.0",
- "files": [
- "System.Reflection.Metadata.1.3.0.nupkg.sha512",
- "System.Reflection.Metadata.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.1/System.Reflection.Metadata.dll",
- "lib/netstandard1.1/System.Reflection.Metadata.xml",
- "lib/portable-net45+win8/System.Reflection.Metadata.dll",
- "lib/portable-net45+win8/System.Reflection.Metadata.xml"
- ]
- },
- "System.Reflection.Primitives/4.0.1": {
- "sha512": "RHbqVEi34/PglMEDY6K5G2CAiH+yqbDsIylzXbXLVJAklQ33CMb51Ip7grLfntTnhjg9zep3YeylTrGYxZDPfQ==",
- "type": "package",
- "path": "System.Reflection.Primitives/4.0.1",
- "files": [
- "System.Reflection.Primitives.4.0.1.nupkg.sha512",
- "System.Reflection.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Reflection.Primitives.dll",
- "ref/netcore50/System.Reflection.Primitives.xml",
- "ref/netcore50/de/System.Reflection.Primitives.xml",
- "ref/netcore50/es/System.Reflection.Primitives.xml",
- "ref/netcore50/fr/System.Reflection.Primitives.xml",
- "ref/netcore50/it/System.Reflection.Primitives.xml",
- "ref/netcore50/ja/System.Reflection.Primitives.xml",
- "ref/netcore50/ko/System.Reflection.Primitives.xml",
- "ref/netcore50/ru/System.Reflection.Primitives.xml",
- "ref/netcore50/zh-hans/System.Reflection.Primitives.xml",
- "ref/netcore50/zh-hant/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/System.Reflection.Primitives.dll",
- "ref/netstandard1.0/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/de/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/es/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/fr/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/it/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/ja/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/ko/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/ru/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/zh-hans/System.Reflection.Primitives.xml",
- "ref/netstandard1.0/zh-hant/System.Reflection.Primitives.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Reflection.TypeExtensions/4.1.0": {
- "sha512": "xcxE/0GefeVYwji0R3kKeJa4NoSPQ/nehbsE95FIfsBo7REzTf5F7Qe64wzjGQ1ynITB/aq+A3wNGk0COmNwhg==",
- "type": "package",
- "path": "System.Reflection.TypeExtensions/4.1.0",
- "files": [
- "System.Reflection.TypeExtensions.4.1.0.nupkg.sha512",
- "System.Reflection.TypeExtensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Reflection.TypeExtensions.dll",
- "lib/net462/System.Reflection.TypeExtensions.dll",
- "lib/netcore50/System.Reflection.TypeExtensions.dll",
- "lib/netstandard1.5/System.Reflection.TypeExtensions.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Reflection.TypeExtensions.dll",
- "ref/net462/System.Reflection.TypeExtensions.dll",
- "ref/netstandard1.3/System.Reflection.TypeExtensions.dll",
- "ref/netstandard1.3/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/de/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/es/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/fr/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/it/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/ja/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/ko/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/ru/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/zh-hans/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.3/zh-hant/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/System.Reflection.TypeExtensions.dll",
- "ref/netstandard1.5/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/de/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/es/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/fr/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/it/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/ja/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/ko/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/ru/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/zh-hans/System.Reflection.TypeExtensions.xml",
- "ref/netstandard1.5/zh-hant/System.Reflection.TypeExtensions.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Reflection.TypeExtensions.dll"
- ]
- },
- "System.Resources.Reader/4.0.0": {
- "sha512": "wEcXzSRd9Up0I0g8bFnq9ujB9RBi8ChqbUCwfpkWoNCE87ykVKgQ3UgFoow0DRR1qs3JoMDNcwFCZk/2j9GweA==",
- "type": "package",
- "path": "System.Resources.Reader/4.0.0",
- "files": [
- "System.Resources.Reader.4.0.0.nupkg.sha512",
- "System.Resources.Reader.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/System.Resources.Reader.dll"
- ]
- },
- "System.Resources.ResourceManager/4.0.1": {
- "sha512": "bt5OMnI0dENfXTKpRxGoJiINymmIz77xDlsZvj/Wqe1GcjmtoArvXd/nazztiqXm3J7Gx5RMo0m51I3TLtQENQ==",
- "type": "package",
- "path": "System.Resources.ResourceManager/4.0.1",
- "files": [
- "System.Resources.ResourceManager.4.0.1.nupkg.sha512",
- "System.Resources.ResourceManager.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Resources.ResourceManager.dll",
- "ref/netcore50/System.Resources.ResourceManager.xml",
- "ref/netcore50/de/System.Resources.ResourceManager.xml",
- "ref/netcore50/es/System.Resources.ResourceManager.xml",
- "ref/netcore50/fr/System.Resources.ResourceManager.xml",
- "ref/netcore50/it/System.Resources.ResourceManager.xml",
- "ref/netcore50/ja/System.Resources.ResourceManager.xml",
- "ref/netcore50/ko/System.Resources.ResourceManager.xml",
- "ref/netcore50/ru/System.Resources.ResourceManager.xml",
- "ref/netcore50/zh-hans/System.Resources.ResourceManager.xml",
- "ref/netcore50/zh-hant/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/System.Resources.ResourceManager.dll",
- "ref/netstandard1.0/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/de/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/es/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/fr/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/it/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/ja/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/ko/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/ru/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/zh-hans/System.Resources.ResourceManager.xml",
- "ref/netstandard1.0/zh-hant/System.Resources.ResourceManager.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime/4.1.0": {
- "sha512": "AOI1YSwpYf4M2z/sZl/26HdH5KpygjfR0vRvTJZjgHTjRxucG7Cr8b3Ili69j0s2XUf2OnZitbIGNJUMyFVpqQ==",
- "type": "package",
- "path": "System.Runtime/4.1.0",
- "files": [
- "System.Runtime.4.1.0.nupkg.sha512",
- "System.Runtime.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.Runtime.dll",
- "lib/portable-net45+win8+wp80+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.Runtime.dll",
- "ref/netcore50/System.Runtime.dll",
- "ref/netcore50/System.Runtime.xml",
- "ref/netcore50/de/System.Runtime.xml",
- "ref/netcore50/es/System.Runtime.xml",
- "ref/netcore50/fr/System.Runtime.xml",
- "ref/netcore50/it/System.Runtime.xml",
- "ref/netcore50/ja/System.Runtime.xml",
- "ref/netcore50/ko/System.Runtime.xml",
- "ref/netcore50/ru/System.Runtime.xml",
- "ref/netcore50/zh-hans/System.Runtime.xml",
- "ref/netcore50/zh-hant/System.Runtime.xml",
- "ref/netstandard1.0/System.Runtime.dll",
- "ref/netstandard1.0/System.Runtime.xml",
- "ref/netstandard1.0/de/System.Runtime.xml",
- "ref/netstandard1.0/es/System.Runtime.xml",
- "ref/netstandard1.0/fr/System.Runtime.xml",
- "ref/netstandard1.0/it/System.Runtime.xml",
- "ref/netstandard1.0/ja/System.Runtime.xml",
- "ref/netstandard1.0/ko/System.Runtime.xml",
- "ref/netstandard1.0/ru/System.Runtime.xml",
- "ref/netstandard1.0/zh-hans/System.Runtime.xml",
- "ref/netstandard1.0/zh-hant/System.Runtime.xml",
- "ref/netstandard1.2/System.Runtime.dll",
- "ref/netstandard1.2/System.Runtime.xml",
- "ref/netstandard1.2/de/System.Runtime.xml",
- "ref/netstandard1.2/es/System.Runtime.xml",
- "ref/netstandard1.2/fr/System.Runtime.xml",
- "ref/netstandard1.2/it/System.Runtime.xml",
- "ref/netstandard1.2/ja/System.Runtime.xml",
- "ref/netstandard1.2/ko/System.Runtime.xml",
- "ref/netstandard1.2/ru/System.Runtime.xml",
- "ref/netstandard1.2/zh-hans/System.Runtime.xml",
- "ref/netstandard1.2/zh-hant/System.Runtime.xml",
- "ref/netstandard1.3/System.Runtime.dll",
- "ref/netstandard1.3/System.Runtime.xml",
- "ref/netstandard1.3/de/System.Runtime.xml",
- "ref/netstandard1.3/es/System.Runtime.xml",
- "ref/netstandard1.3/fr/System.Runtime.xml",
- "ref/netstandard1.3/it/System.Runtime.xml",
- "ref/netstandard1.3/ja/System.Runtime.xml",
- "ref/netstandard1.3/ko/System.Runtime.xml",
- "ref/netstandard1.3/ru/System.Runtime.xml",
- "ref/netstandard1.3/zh-hans/System.Runtime.xml",
- "ref/netstandard1.3/zh-hant/System.Runtime.xml",
- "ref/netstandard1.5/System.Runtime.dll",
- "ref/netstandard1.5/System.Runtime.xml",
- "ref/netstandard1.5/de/System.Runtime.xml",
- "ref/netstandard1.5/es/System.Runtime.xml",
- "ref/netstandard1.5/fr/System.Runtime.xml",
- "ref/netstandard1.5/it/System.Runtime.xml",
- "ref/netstandard1.5/ja/System.Runtime.xml",
- "ref/netstandard1.5/ko/System.Runtime.xml",
- "ref/netstandard1.5/ru/System.Runtime.xml",
- "ref/netstandard1.5/zh-hans/System.Runtime.xml",
- "ref/netstandard1.5/zh-hant/System.Runtime.xml",
- "ref/portable-net45+win8+wp80+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime.Extensions/4.1.0": {
- "sha512": "543BhQMyqyp353EiDkb7abmeme8H40shEjVdmbRz16WznSWHpzQVAWhIr/c327XwtoedYqgHJiLEtqc5RRyE7w==",
- "type": "package",
- "path": "System.Runtime.Extensions/4.1.0",
- "files": [
- "System.Runtime.Extensions.4.1.0.nupkg.sha512",
- "System.Runtime.Extensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.Runtime.Extensions.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.Runtime.Extensions.dll",
- "ref/netcore50/System.Runtime.Extensions.dll",
- "ref/netcore50/System.Runtime.Extensions.xml",
- "ref/netcore50/de/System.Runtime.Extensions.xml",
- "ref/netcore50/es/System.Runtime.Extensions.xml",
- "ref/netcore50/fr/System.Runtime.Extensions.xml",
- "ref/netcore50/it/System.Runtime.Extensions.xml",
- "ref/netcore50/ja/System.Runtime.Extensions.xml",
- "ref/netcore50/ko/System.Runtime.Extensions.xml",
- "ref/netcore50/ru/System.Runtime.Extensions.xml",
- "ref/netcore50/zh-hans/System.Runtime.Extensions.xml",
- "ref/netcore50/zh-hant/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/System.Runtime.Extensions.dll",
- "ref/netstandard1.0/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/de/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/es/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/fr/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/it/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/ja/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/ko/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/ru/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/zh-hans/System.Runtime.Extensions.xml",
- "ref/netstandard1.0/zh-hant/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/System.Runtime.Extensions.dll",
- "ref/netstandard1.3/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/de/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/es/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/fr/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/it/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/ja/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/ko/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/ru/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/zh-hans/System.Runtime.Extensions.xml",
- "ref/netstandard1.3/zh-hant/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/System.Runtime.Extensions.dll",
- "ref/netstandard1.5/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/de/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/es/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/fr/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/it/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/ja/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/ko/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/ru/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/zh-hans/System.Runtime.Extensions.xml",
- "ref/netstandard1.5/zh-hant/System.Runtime.Extensions.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime.Handles/4.0.1": {
- "sha512": "RlFrTFpi/wWFUkiO+GAG8vaIes08tUzl8iU5Kok8/PQQtLEHn9+nF24xqClb6WM8HA4LulKVjAleu5qfk0GkjQ==",
- "type": "package",
- "path": "System.Runtime.Handles/4.0.1",
- "files": [
- "System.Runtime.Handles.4.0.1.nupkg.sha512",
- "System.Runtime.Handles.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/_._",
- "ref/netstandard1.3/System.Runtime.Handles.dll",
- "ref/netstandard1.3/System.Runtime.Handles.xml",
- "ref/netstandard1.3/de/System.Runtime.Handles.xml",
- "ref/netstandard1.3/es/System.Runtime.Handles.xml",
- "ref/netstandard1.3/fr/System.Runtime.Handles.xml",
- "ref/netstandard1.3/it/System.Runtime.Handles.xml",
- "ref/netstandard1.3/ja/System.Runtime.Handles.xml",
- "ref/netstandard1.3/ko/System.Runtime.Handles.xml",
- "ref/netstandard1.3/ru/System.Runtime.Handles.xml",
- "ref/netstandard1.3/zh-hans/System.Runtime.Handles.xml",
- "ref/netstandard1.3/zh-hant/System.Runtime.Handles.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime.InteropServices/4.1.0": {
- "sha512": "66DSgKoK3eBQVu/RWw691cWYGR85bB4+Pad+pRnPMkL82X/chYUhM+sr+MddZhma51NmrBa8XYqTUTNO0m1GpQ==",
- "type": "package",
- "path": "System.Runtime.InteropServices/4.1.0",
- "files": [
- "System.Runtime.InteropServices.4.1.0.nupkg.sha512",
- "System.Runtime.InteropServices.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net462/System.Runtime.InteropServices.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net462/System.Runtime.InteropServices.dll",
- "ref/netcore50/System.Runtime.InteropServices.dll",
- "ref/netcore50/System.Runtime.InteropServices.xml",
- "ref/netcore50/de/System.Runtime.InteropServices.xml",
- "ref/netcore50/es/System.Runtime.InteropServices.xml",
- "ref/netcore50/fr/System.Runtime.InteropServices.xml",
- "ref/netcore50/it/System.Runtime.InteropServices.xml",
- "ref/netcore50/ja/System.Runtime.InteropServices.xml",
- "ref/netcore50/ko/System.Runtime.InteropServices.xml",
- "ref/netcore50/ru/System.Runtime.InteropServices.xml",
- "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml",
- "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/System.Runtime.InteropServices.dll",
- "ref/netstandard1.1/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/de/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/es/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/fr/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/it/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/ja/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/ko/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/ru/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/zh-hans/System.Runtime.InteropServices.xml",
- "ref/netstandard1.1/zh-hant/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/System.Runtime.InteropServices.dll",
- "ref/netstandard1.2/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/de/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/es/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/fr/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/it/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/ja/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/ko/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/ru/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/zh-hans/System.Runtime.InteropServices.xml",
- "ref/netstandard1.2/zh-hant/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/System.Runtime.InteropServices.dll",
- "ref/netstandard1.3/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/de/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/es/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/fr/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/it/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/ja/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/ko/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/ru/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/zh-hans/System.Runtime.InteropServices.xml",
- "ref/netstandard1.3/zh-hant/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/System.Runtime.InteropServices.dll",
- "ref/netstandard1.5/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/de/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/es/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/fr/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/it/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/ja/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/ko/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/ru/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/zh-hans/System.Runtime.InteropServices.xml",
- "ref/netstandard1.5/zh-hant/System.Runtime.InteropServices.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
- "sha512": "q/OiUBYq+ef78e5tAnLdJfLyuQIgNMA3TfvLrI+GLat17fIHstj4LSpAEAHuW5bCL0b4DIfw6I/u9JmdnetZSA==",
- "type": "package",
- "path": "System.Runtime.InteropServices.RuntimeInformation/4.0.0",
- "files": [
- "System.Runtime.InteropServices.RuntimeInformation.4.0.0.nupkg.sha512",
- "System.Runtime.InteropServices.RuntimeInformation.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll",
- "lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll",
- "lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll",
- "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll",
- "runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll",
- "runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll",
- "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll"
- ]
- },
- "System.Runtime.Loader/4.0.0": {
- "sha512": "GVDPw97lKyJrAsvej1IORrFlN6RsHsII0OzoZvUpWkF6AknRI9a1cLUAlzxp/d4rUHhGgK7Wapp7TbIy7Rp8TA==",
- "type": "package",
- "path": "System.Runtime.Loader/4.0.0",
- "files": [
- "System.Runtime.Loader.4.0.0.nupkg.sha512",
- "System.Runtime.Loader.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net462/_._",
- "lib/netstandard1.5/System.Runtime.Loader.dll",
- "ref/netstandard1.5/System.Runtime.Loader.dll",
- "ref/netstandard1.5/System.Runtime.Loader.xml",
- "ref/netstandard1.5/de/System.Runtime.Loader.xml",
- "ref/netstandard1.5/es/System.Runtime.Loader.xml",
- "ref/netstandard1.5/fr/System.Runtime.Loader.xml",
- "ref/netstandard1.5/it/System.Runtime.Loader.xml",
- "ref/netstandard1.5/ja/System.Runtime.Loader.xml",
- "ref/netstandard1.5/ko/System.Runtime.Loader.xml",
- "ref/netstandard1.5/ru/System.Runtime.Loader.xml",
- "ref/netstandard1.5/zh-hans/System.Runtime.Loader.xml",
- "ref/netstandard1.5/zh-hant/System.Runtime.Loader.xml"
- ]
- },
- "System.Runtime.Numerics/4.0.1": {
- "sha512": "laG2qiVk8jeL4KUuYhSBnm32EqEWDnzSfxe1QjhJD7c6DDwsqLjiIv3ck4gs5PGSYYCH5hSb5x32+5VxD/IiBw==",
- "type": "package",
- "path": "System.Runtime.Numerics/4.0.1",
- "files": [
- "System.Runtime.Numerics.4.0.1.nupkg.sha512",
- "System.Runtime.Numerics.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Runtime.Numerics.dll",
- "lib/netstandard1.3/System.Runtime.Numerics.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Runtime.Numerics.dll",
- "ref/netcore50/System.Runtime.Numerics.xml",
- "ref/netcore50/de/System.Runtime.Numerics.xml",
- "ref/netcore50/es/System.Runtime.Numerics.xml",
- "ref/netcore50/fr/System.Runtime.Numerics.xml",
- "ref/netcore50/it/System.Runtime.Numerics.xml",
- "ref/netcore50/ja/System.Runtime.Numerics.xml",
- "ref/netcore50/ko/System.Runtime.Numerics.xml",
- "ref/netcore50/ru/System.Runtime.Numerics.xml",
- "ref/netcore50/zh-hans/System.Runtime.Numerics.xml",
- "ref/netcore50/zh-hant/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/System.Runtime.Numerics.dll",
- "ref/netstandard1.1/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/de/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/es/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/fr/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/it/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/ja/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/ko/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/ru/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/zh-hans/System.Runtime.Numerics.xml",
- "ref/netstandard1.1/zh-hant/System.Runtime.Numerics.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Runtime.Serialization.Primitives/4.1.1": {
- "sha512": "HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg==",
- "type": "package",
- "path": "System.Runtime.Serialization.Primitives/4.1.1",
- "files": [
- "System.Runtime.Serialization.Primitives.4.1.1.nupkg.sha512",
- "System.Runtime.Serialization.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net46/System.Runtime.Serialization.Primitives.dll",
- "lib/netcore50/System.Runtime.Serialization.Primitives.dll",
- "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net46/System.Runtime.Serialization.Primitives.dll",
- "ref/netcore50/System.Runtime.Serialization.Primitives.dll",
- "ref/netcore50/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/de/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/es/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/fr/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/it/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/ja/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/ko/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/ru/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/zh-hans/System.Runtime.Serialization.Primitives.xml",
- "ref/netcore50/zh-hant/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/System.Runtime.Serialization.Primitives.dll",
- "ref/netstandard1.0/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/de/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/es/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/fr/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/it/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/ja/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/ko/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/ru/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/zh-hans/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.0/zh-hant/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll",
- "ref/netstandard1.3/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/de/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/es/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/fr/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/it/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/ja/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/ko/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/ru/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/zh-hans/System.Runtime.Serialization.Primitives.xml",
- "ref/netstandard1.3/zh-hant/System.Runtime.Serialization.Primitives.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Runtime.Serialization.Primitives.dll"
- ]
- },
- "System.Security.Claims/4.0.1": {
- "sha512": "TdJNr7fWHYV0BxUCN3p9ihfTH94sLvBieTMI3SRmdzW5AEWwZ3kYrhQFUtlYcCxJIaLGAe7Bkxbhe2tYKTJtcg==",
- "type": "package",
- "path": "System.Security.Claims/4.0.1",
- "files": [
- "System.Security.Claims.4.0.1.nupkg.sha512",
- "System.Security.Claims.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Claims.dll",
- "lib/netstandard1.3/System.Security.Claims.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Claims.dll",
- "ref/netstandard1.3/System.Security.Claims.dll",
- "ref/netstandard1.3/System.Security.Claims.xml",
- "ref/netstandard1.3/de/System.Security.Claims.xml",
- "ref/netstandard1.3/es/System.Security.Claims.xml",
- "ref/netstandard1.3/fr/System.Security.Claims.xml",
- "ref/netstandard1.3/it/System.Security.Claims.xml",
- "ref/netstandard1.3/ja/System.Security.Claims.xml",
- "ref/netstandard1.3/ko/System.Security.Claims.xml",
- "ref/netstandard1.3/ru/System.Security.Claims.xml",
- "ref/netstandard1.3/zh-hans/System.Security.Claims.xml",
- "ref/netstandard1.3/zh-hant/System.Security.Claims.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Security.Cryptography.Algorithms/4.2.0": {
- "sha512": "VISLYkxSKh2Hx2FRpmuv1Hltyls8nWxqLLFiWUT2VUxbKXVco7zXpUDHIhSKtT7gKaM2BotwIRjF0UrfCawT2Q==",
- "type": "package",
- "path": "System.Security.Cryptography.Algorithms/4.2.0",
- "files": [
- "System.Security.Cryptography.Algorithms.4.2.0.nupkg.sha512",
- "System.Security.Cryptography.Algorithms.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Cryptography.Algorithms.dll",
- "lib/net461/System.Security.Cryptography.Algorithms.dll",
- "lib/net463/System.Security.Cryptography.Algorithms.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Cryptography.Algorithms.dll",
- "ref/net461/System.Security.Cryptography.Algorithms.dll",
- "ref/net463/System.Security.Cryptography.Algorithms.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Algorithms.dll",
- "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll",
- "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll",
- "runtimes/win/lib/net46/System.Security.Cryptography.Algorithms.dll",
- "runtimes/win/lib/net461/System.Security.Cryptography.Algorithms.dll",
- "runtimes/win/lib/net463/System.Security.Cryptography.Algorithms.dll",
- "runtimes/win/lib/netcore50/System.Security.Cryptography.Algorithms.dll",
- "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll"
- ]
- },
- "System.Security.Cryptography.Cng/4.2.0": {
- "sha512": "YVJ609JunCq++x47/5FsAzFS/0oRz/tYOcpxY4qVfWW0PSQ4CaTOvpG+nFxLv+uDAiKW5h8++eUSTgPsM+Df9g==",
- "type": "package",
- "path": "System.Security.Cryptography.Cng/4.2.0",
- "files": [
- "System.Security.Cryptography.Cng.4.2.0.nupkg.sha512",
- "System.Security.Cryptography.Cng.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net46/System.Security.Cryptography.Cng.dll",
- "lib/net461/System.Security.Cryptography.Cng.dll",
- "lib/net463/System.Security.Cryptography.Cng.dll",
- "ref/net46/System.Security.Cryptography.Cng.dll",
- "ref/net461/System.Security.Cryptography.Cng.dll",
- "ref/net463/System.Security.Cryptography.Cng.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Cng.dll",
- "ref/netstandard1.4/System.Security.Cryptography.Cng.dll",
- "ref/netstandard1.6/System.Security.Cryptography.Cng.dll",
- "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Cng.dll",
- "runtimes/win/lib/net46/System.Security.Cryptography.Cng.dll",
- "runtimes/win/lib/net461/System.Security.Cryptography.Cng.dll",
- "runtimes/win/lib/net463/System.Security.Cryptography.Cng.dll",
- "runtimes/win/lib/netstandard1.4/System.Security.Cryptography.Cng.dll",
- "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Cng.dll"
- ]
- },
- "System.Security.Cryptography.Csp/4.0.0": {
- "sha512": "+79Zn4o7wmmjImypvxcpYZRkUIE0HpYGQqP/frDouaV5W2clx8CNWmI47fv6EFuPJr+S98YykBoDlwGMapIrnQ==",
- "type": "package",
- "path": "System.Security.Cryptography.Csp/4.0.0",
- "files": [
- "System.Security.Cryptography.Csp.4.0.0.nupkg.sha512",
- "System.Security.Cryptography.Csp.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Cryptography.Csp.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Cryptography.Csp.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Csp.dll",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Csp.dll",
- "runtimes/win/lib/net46/System.Security.Cryptography.Csp.dll",
- "runtimes/win/lib/netcore50/_._",
- "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Csp.dll"
- ]
- },
- "System.Security.Cryptography.Encoding/4.0.0": {
- "sha512": "NViKmTxMps6OtW1a3U/pdt2OAqQxmgjO0NZs0A88iPqauL4FnZo9bo53G+ASfqfDIclTkofgaH1xBtO6pE3s+g==",
- "type": "package",
- "path": "System.Security.Cryptography.Encoding/4.0.0",
- "files": [
- "System.Security.Cryptography.Encoding.4.0.0.nupkg.sha512",
- "System.Security.Cryptography.Encoding.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Cryptography.Encoding.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Cryptography.Encoding.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/de/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/es/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/fr/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/it/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/ja/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/ko/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/ru/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/zh-hans/System.Security.Cryptography.Encoding.xml",
- "ref/netstandard1.3/zh-hant/System.Security.Cryptography.Encoding.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll",
- "runtimes/win/lib/net46/System.Security.Cryptography.Encoding.dll",
- "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll"
- ]
- },
- "System.Security.Cryptography.OpenSsl/4.0.0": {
- "sha512": "XLf1DoeZp6gAee2hqO14Nzgty5dWNlwdx/D77pc29rp6okb9FEkeWLfqWnHeV4ImoRNxiLi/JU09sPJcMBru5A==",
- "type": "package",
- "path": "System.Security.Cryptography.OpenSsl/4.0.0",
- "files": [
- "System.Security.Cryptography.OpenSsl.4.0.0.nupkg.sha512",
- "System.Security.Cryptography.OpenSsl.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll",
- "ref/netstandard1.6/System.Security.Cryptography.OpenSsl.dll",
- "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll"
- ]
- },
- "System.Security.Cryptography.Primitives/4.0.0": {
- "sha512": "oXU/KGnf3TT2ykVPC/Arbo45a2OatGvw+Ko3KpdbIGuqRzN22YB34K39QpNviz6oE5v0VBLj4PWd+JLvNKdy0w==",
- "type": "package",
- "path": "System.Security.Cryptography.Primitives/4.0.0",
- "files": [
- "System.Security.Cryptography.Primitives.4.0.0.nupkg.sha512",
- "System.Security.Cryptography.Primitives.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Cryptography.Primitives.dll",
- "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Cryptography.Primitives.dll",
- "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Security.Cryptography.X509Certificates/4.1.0": {
- "sha512": "w2uEJo9ShGvwpRlF9wFpfESMl0tyKCeLMQ9+LF6c7vCn6KR66XHoC+kBK3+7uBsRdWNDhUCowslZH4wZHWfs9A==",
- "type": "package",
- "path": "System.Security.Cryptography.X509Certificates/4.1.0",
- "files": [
- "System.Security.Cryptography.X509Certificates.4.1.0.nupkg.sha512",
- "System.Security.Cryptography.X509Certificates.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Security.Cryptography.X509Certificates.dll",
- "lib/net461/System.Security.Cryptography.X509Certificates.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Security.Cryptography.X509Certificates.dll",
- "ref/net461/System.Security.Cryptography.X509Certificates.dll",
- "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.dll",
- "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/de/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/es/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/fr/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/it/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/ja/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/ko/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/ru/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/zh-hans/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.3/zh-hant/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll",
- "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/de/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/es/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/fr/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/it/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/ja/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/ko/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/ru/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/zh-hans/System.Security.Cryptography.X509Certificates.xml",
- "ref/netstandard1.4/zh-hant/System.Security.Cryptography.X509Certificates.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll",
- "runtimes/win/lib/net46/System.Security.Cryptography.X509Certificates.dll",
- "runtimes/win/lib/net461/System.Security.Cryptography.X509Certificates.dll",
- "runtimes/win/lib/netcore50/System.Security.Cryptography.X509Certificates.dll",
- "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll"
- ]
- },
- "System.Security.Principal/4.0.1": {
- "sha512": "2YVhlpjs7+fOcWRfPZ7HKZTVlahADbExA0WvHWS9OM7SkBY4SS+OeuYn2oIPuCTaezKY/OMBjPbpsW/bQh5wRA==",
- "type": "package",
- "path": "System.Security.Principal/4.0.1",
- "files": [
- "System.Security.Principal.4.0.1.nupkg.sha512",
- "System.Security.Principal.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Security.Principal.dll",
- "lib/netstandard1.0/System.Security.Principal.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Security.Principal.dll",
- "ref/netcore50/System.Security.Principal.xml",
- "ref/netcore50/de/System.Security.Principal.xml",
- "ref/netcore50/es/System.Security.Principal.xml",
- "ref/netcore50/fr/System.Security.Principal.xml",
- "ref/netcore50/it/System.Security.Principal.xml",
- "ref/netcore50/ja/System.Security.Principal.xml",
- "ref/netcore50/ko/System.Security.Principal.xml",
- "ref/netcore50/ru/System.Security.Principal.xml",
- "ref/netcore50/zh-hans/System.Security.Principal.xml",
- "ref/netcore50/zh-hant/System.Security.Principal.xml",
- "ref/netstandard1.0/System.Security.Principal.dll",
- "ref/netstandard1.0/System.Security.Principal.xml",
- "ref/netstandard1.0/de/System.Security.Principal.xml",
- "ref/netstandard1.0/es/System.Security.Principal.xml",
- "ref/netstandard1.0/fr/System.Security.Principal.xml",
- "ref/netstandard1.0/it/System.Security.Principal.xml",
- "ref/netstandard1.0/ja/System.Security.Principal.xml",
- "ref/netstandard1.0/ko/System.Security.Principal.xml",
- "ref/netstandard1.0/ru/System.Security.Principal.xml",
- "ref/netstandard1.0/zh-hans/System.Security.Principal.xml",
- "ref/netstandard1.0/zh-hant/System.Security.Principal.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Security.Principal.Windows/4.0.0": {
- "sha512": "0fkMXcsodkuQp6KaCiiutGfBFB5AqqWJF9fQB05wDJYJi8Ceerx+Mp3NVofA/HeZ4ngY+gFg0t6P3OAkpSCTYQ==",
- "type": "package",
- "path": "System.Security.Principal.Windows/4.0.0",
- "files": [
- "System.Security.Principal.Windows.4.0.0.nupkg.sha512",
- "System.Security.Principal.Windows.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net46/System.Security.Principal.Windows.dll",
- "ref/net46/System.Security.Principal.Windows.dll",
- "ref/netstandard1.3/System.Security.Principal.Windows.dll",
- "ref/netstandard1.3/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/de/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/es/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/fr/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/it/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/ja/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/ko/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/ru/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/zh-hans/System.Security.Principal.Windows.xml",
- "ref/netstandard1.3/zh-hant/System.Security.Principal.Windows.xml",
- "runtimes/unix/lib/netstandard1.3/System.Security.Principal.Windows.dll",
- "runtimes/win/lib/net46/System.Security.Principal.Windows.dll",
- "runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll"
- ]
- },
- "System.Text.Encoding/4.0.11": {
- "sha512": "VmNf3C4yhkGkFEahnzG4ANqjyzgXC82XvG0434o8XRGRBC7x/2C/GuDGIe95a/SjA9bJjho4JxP0xVuyZm2vVw==",
- "type": "package",
- "path": "System.Text.Encoding/4.0.11",
- "files": [
- "System.Text.Encoding.4.0.11.nupkg.sha512",
- "System.Text.Encoding.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Text.Encoding.dll",
- "ref/netcore50/System.Text.Encoding.xml",
- "ref/netcore50/de/System.Text.Encoding.xml",
- "ref/netcore50/es/System.Text.Encoding.xml",
- "ref/netcore50/fr/System.Text.Encoding.xml",
- "ref/netcore50/it/System.Text.Encoding.xml",
- "ref/netcore50/ja/System.Text.Encoding.xml",
- "ref/netcore50/ko/System.Text.Encoding.xml",
- "ref/netcore50/ru/System.Text.Encoding.xml",
- "ref/netcore50/zh-hans/System.Text.Encoding.xml",
- "ref/netcore50/zh-hant/System.Text.Encoding.xml",
- "ref/netstandard1.0/System.Text.Encoding.dll",
- "ref/netstandard1.0/System.Text.Encoding.xml",
- "ref/netstandard1.0/de/System.Text.Encoding.xml",
- "ref/netstandard1.0/es/System.Text.Encoding.xml",
- "ref/netstandard1.0/fr/System.Text.Encoding.xml",
- "ref/netstandard1.0/it/System.Text.Encoding.xml",
- "ref/netstandard1.0/ja/System.Text.Encoding.xml",
- "ref/netstandard1.0/ko/System.Text.Encoding.xml",
- "ref/netstandard1.0/ru/System.Text.Encoding.xml",
- "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml",
- "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml",
- "ref/netstandard1.3/System.Text.Encoding.dll",
- "ref/netstandard1.3/System.Text.Encoding.xml",
- "ref/netstandard1.3/de/System.Text.Encoding.xml",
- "ref/netstandard1.3/es/System.Text.Encoding.xml",
- "ref/netstandard1.3/fr/System.Text.Encoding.xml",
- "ref/netstandard1.3/it/System.Text.Encoding.xml",
- "ref/netstandard1.3/ja/System.Text.Encoding.xml",
- "ref/netstandard1.3/ko/System.Text.Encoding.xml",
- "ref/netstandard1.3/ru/System.Text.Encoding.xml",
- "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml",
- "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Text.Encoding.CodePages/4.0.1": {
- "sha512": "9Ovjc/+OFvoxe77pOHRiwu0mph0MNmXa2qOKq2XS672f0CPZ3Z4X5/wpqBVYfuaut72OSLrBb1MvIm8MhEtgvA==",
- "type": "package",
- "path": "System.Text.Encoding.CodePages/4.0.1",
- "files": [
- "System.Text.Encoding.CodePages.4.0.1.nupkg.sha512",
- "System.Text.Encoding.CodePages.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Text.Encoding.CodePages.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/netstandard1.3/System.Text.Encoding.CodePages.dll",
- "ref/netstandard1.3/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/de/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/es/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/fr/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/it/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/ja/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/ko/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/ru/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/zh-hans/System.Text.Encoding.CodePages.xml",
- "ref/netstandard1.3/zh-hant/System.Text.Encoding.CodePages.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll",
- "runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll"
- ]
- },
- "System.Text.Encoding.Extensions/4.0.11": {
- "sha512": "2bid7vf9JAPdw4zYnPtRXTJGWr1XR372EwzSNFJIT8ctmsZSHqGxcjVx/xUYfHtG8QN/mILpLSM3BUMCfEST4Q==",
- "type": "package",
- "path": "System.Text.Encoding.Extensions/4.0.11",
- "files": [
- "System.Text.Encoding.Extensions.4.0.11.nupkg.sha512",
- "System.Text.Encoding.Extensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Text.Encoding.Extensions.dll",
- "ref/netcore50/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/de/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/es/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/fr/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/it/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/ja/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/ko/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/ru/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/zh-hans/System.Text.Encoding.Extensions.xml",
- "ref/netcore50/zh-hant/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/System.Text.Encoding.Extensions.dll",
- "ref/netstandard1.0/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/de/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/es/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/fr/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/it/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/ja/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/ko/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/ru/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/zh-hans/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.0/zh-hant/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/System.Text.Encoding.Extensions.dll",
- "ref/netstandard1.3/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/de/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/es/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/fr/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/it/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/ja/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/ko/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/ru/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/zh-hans/System.Text.Encoding.Extensions.xml",
- "ref/netstandard1.3/zh-hant/System.Text.Encoding.Extensions.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Text.RegularExpressions/4.1.0": {
- "sha512": "RpuCs3WWe11xaEivjjft+sxZ8w92OXpOzCkAS96Uvgs9XYWtGMfPhPuBPUgaCNYEtSOkwXDiSYxwQy/UtK0FVw==",
- "type": "package",
- "path": "System.Text.RegularExpressions/4.1.0",
- "files": [
- "System.Text.RegularExpressions.4.1.0.nupkg.sha512",
- "System.Text.RegularExpressions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/net463/System.Text.RegularExpressions.dll",
- "lib/netcore50/System.Text.RegularExpressions.dll",
- "lib/netstandard1.6/System.Text.RegularExpressions.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/net463/System.Text.RegularExpressions.dll",
- "ref/netcore50/System.Text.RegularExpressions.dll",
- "ref/netcore50/System.Text.RegularExpressions.xml",
- "ref/netcore50/de/System.Text.RegularExpressions.xml",
- "ref/netcore50/es/System.Text.RegularExpressions.xml",
- "ref/netcore50/fr/System.Text.RegularExpressions.xml",
- "ref/netcore50/it/System.Text.RegularExpressions.xml",
- "ref/netcore50/ja/System.Text.RegularExpressions.xml",
- "ref/netcore50/ko/System.Text.RegularExpressions.xml",
- "ref/netcore50/ru/System.Text.RegularExpressions.xml",
- "ref/netcore50/zh-hans/System.Text.RegularExpressions.xml",
- "ref/netcore50/zh-hant/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/System.Text.RegularExpressions.dll",
- "ref/netstandard1.0/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/de/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/es/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/fr/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/it/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/ja/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/ko/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/ru/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/zh-hans/System.Text.RegularExpressions.xml",
- "ref/netstandard1.0/zh-hant/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/System.Text.RegularExpressions.dll",
- "ref/netstandard1.3/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/de/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/es/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/fr/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/it/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/ja/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/ko/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/ru/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/zh-hans/System.Text.RegularExpressions.xml",
- "ref/netstandard1.3/zh-hant/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/System.Text.RegularExpressions.dll",
- "ref/netstandard1.6/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/de/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/es/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/fr/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/it/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/ja/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/ko/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/ru/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/zh-hans/System.Text.RegularExpressions.xml",
- "ref/netstandard1.6/zh-hant/System.Text.RegularExpressions.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Threading/4.0.11": {
- "sha512": "RKqouvORktflN2qrqXkwlA2jzKlv2re7S2tXD7ccg706T87CCWP6d34oFX8o4m7aOKcAtETwbDM6q6pp06goAQ==",
- "type": "package",
- "path": "System.Threading/4.0.11",
- "files": [
- "System.Threading.4.0.11.nupkg.sha512",
- "System.Threading.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Threading.dll",
- "lib/netstandard1.3/System.Threading.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Threading.dll",
- "ref/netcore50/System.Threading.xml",
- "ref/netcore50/de/System.Threading.xml",
- "ref/netcore50/es/System.Threading.xml",
- "ref/netcore50/fr/System.Threading.xml",
- "ref/netcore50/it/System.Threading.xml",
- "ref/netcore50/ja/System.Threading.xml",
- "ref/netcore50/ko/System.Threading.xml",
- "ref/netcore50/ru/System.Threading.xml",
- "ref/netcore50/zh-hans/System.Threading.xml",
- "ref/netcore50/zh-hant/System.Threading.xml",
- "ref/netstandard1.0/System.Threading.dll",
- "ref/netstandard1.0/System.Threading.xml",
- "ref/netstandard1.0/de/System.Threading.xml",
- "ref/netstandard1.0/es/System.Threading.xml",
- "ref/netstandard1.0/fr/System.Threading.xml",
- "ref/netstandard1.0/it/System.Threading.xml",
- "ref/netstandard1.0/ja/System.Threading.xml",
- "ref/netstandard1.0/ko/System.Threading.xml",
- "ref/netstandard1.0/ru/System.Threading.xml",
- "ref/netstandard1.0/zh-hans/System.Threading.xml",
- "ref/netstandard1.0/zh-hant/System.Threading.xml",
- "ref/netstandard1.3/System.Threading.dll",
- "ref/netstandard1.3/System.Threading.xml",
- "ref/netstandard1.3/de/System.Threading.xml",
- "ref/netstandard1.3/es/System.Threading.xml",
- "ref/netstandard1.3/fr/System.Threading.xml",
- "ref/netstandard1.3/it/System.Threading.xml",
- "ref/netstandard1.3/ja/System.Threading.xml",
- "ref/netstandard1.3/ko/System.Threading.xml",
- "ref/netstandard1.3/ru/System.Threading.xml",
- "ref/netstandard1.3/zh-hans/System.Threading.xml",
- "ref/netstandard1.3/zh-hant/System.Threading.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._",
- "runtimes/aot/lib/netcore50/System.Threading.dll"
- ]
- },
- "System.Threading.Overlapped/4.0.1": {
- "sha512": "i4TFJn9x/ItIURnFrCtt38dGEcRadrvtJZ0f1ooNpywjWQCFPu6rm1AnQ0Kx+7kMgwkx1P/VLrDCiFx1GMh94w==",
- "type": "package",
- "path": "System.Threading.Overlapped/4.0.1",
- "files": [
- "System.Threading.Overlapped.4.0.1.nupkg.sha512",
- "System.Threading.Overlapped.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/net46/System.Threading.Overlapped.dll",
- "ref/net46/System.Threading.Overlapped.dll",
- "ref/netstandard1.3/System.Threading.Overlapped.dll",
- "ref/netstandard1.3/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/de/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/es/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/fr/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/it/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/ja/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/ko/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/ru/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/zh-hans/System.Threading.Overlapped.xml",
- "ref/netstandard1.3/zh-hant/System.Threading.Overlapped.xml",
- "runtimes/unix/lib/netstandard1.3/System.Threading.Overlapped.dll",
- "runtimes/win/lib/net46/System.Threading.Overlapped.dll",
- "runtimes/win/lib/netcore50/System.Threading.Overlapped.dll",
- "runtimes/win/lib/netstandard1.3/System.Threading.Overlapped.dll"
- ]
- },
- "System.Threading.Tasks/4.0.11": {
- "sha512": "8dx7BKkXtbEuLYR+D99ZBz6xoEvmAyK+uk4j3kIbSC730jeIfh2KFECHztuHI/9jMHGWCXZlVpw4XJevgpAweQ==",
- "type": "package",
- "path": "System.Threading.Tasks/4.0.11",
- "files": [
- "System.Threading.Tasks.4.0.11.nupkg.sha512",
- "System.Threading.Tasks.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Threading.Tasks.dll",
- "ref/netcore50/System.Threading.Tasks.xml",
- "ref/netcore50/de/System.Threading.Tasks.xml",
- "ref/netcore50/es/System.Threading.Tasks.xml",
- "ref/netcore50/fr/System.Threading.Tasks.xml",
- "ref/netcore50/it/System.Threading.Tasks.xml",
- "ref/netcore50/ja/System.Threading.Tasks.xml",
- "ref/netcore50/ko/System.Threading.Tasks.xml",
- "ref/netcore50/ru/System.Threading.Tasks.xml",
- "ref/netcore50/zh-hans/System.Threading.Tasks.xml",
- "ref/netcore50/zh-hant/System.Threading.Tasks.xml",
- "ref/netstandard1.0/System.Threading.Tasks.dll",
- "ref/netstandard1.0/System.Threading.Tasks.xml",
- "ref/netstandard1.0/de/System.Threading.Tasks.xml",
- "ref/netstandard1.0/es/System.Threading.Tasks.xml",
- "ref/netstandard1.0/fr/System.Threading.Tasks.xml",
- "ref/netstandard1.0/it/System.Threading.Tasks.xml",
- "ref/netstandard1.0/ja/System.Threading.Tasks.xml",
- "ref/netstandard1.0/ko/System.Threading.Tasks.xml",
- "ref/netstandard1.0/ru/System.Threading.Tasks.xml",
- "ref/netstandard1.0/zh-hans/System.Threading.Tasks.xml",
- "ref/netstandard1.0/zh-hant/System.Threading.Tasks.xml",
- "ref/netstandard1.3/System.Threading.Tasks.dll",
- "ref/netstandard1.3/System.Threading.Tasks.xml",
- "ref/netstandard1.3/de/System.Threading.Tasks.xml",
- "ref/netstandard1.3/es/System.Threading.Tasks.xml",
- "ref/netstandard1.3/fr/System.Threading.Tasks.xml",
- "ref/netstandard1.3/it/System.Threading.Tasks.xml",
- "ref/netstandard1.3/ja/System.Threading.Tasks.xml",
- "ref/netstandard1.3/ko/System.Threading.Tasks.xml",
- "ref/netstandard1.3/ru/System.Threading.Tasks.xml",
- "ref/netstandard1.3/zh-hans/System.Threading.Tasks.xml",
- "ref/netstandard1.3/zh-hant/System.Threading.Tasks.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Threading.Tasks.Dataflow/4.6.0": {
- "sha512": "MyOVg+TfJE75GjXQwOYMJF/VLuVvLgRPKCG9e2Rci5PBk+lmFyvMUsqwsZIPiVd17fVkrYQ4PG9pe3PTRifYmQ==",
- "type": "package",
- "path": "System.Threading.Tasks.Dataflow/4.6.0",
- "files": [
- "System.Threading.Tasks.Dataflow.4.6.0.nupkg.sha512",
- "System.Threading.Tasks.Dataflow.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/System.Threading.Tasks.Dataflow.XML",
- "lib/netstandard1.0/System.Threading.Tasks.Dataflow.dll",
- "lib/netstandard1.1/System.Threading.Tasks.Dataflow.XML",
- "lib/netstandard1.1/System.Threading.Tasks.Dataflow.dll"
- ]
- },
- "System.Threading.Tasks.Extensions/4.0.0": {
- "sha512": "CEb+Dxk1mpyLjMSdShNL/36ZxzbSiW7ti8GOs8xVEui5gv3xHqPDOHNfY/MCnyne4x/gYEkds0ai/X9KCgUoyw==",
- "type": "package",
- "path": "System.Threading.Tasks.Extensions/4.0.0",
- "files": [
- "System.Threading.Tasks.Extensions.4.0.0.nupkg.sha512",
- "System.Threading.Tasks.Extensions.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll",
- "lib/netstandard1.0/System.Threading.Tasks.Extensions.xml",
- "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll",
- "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.xml"
- ]
- },
- "System.Threading.Tasks.Parallel/4.0.1": {
- "sha512": "Y0MBvfr+Z6ojLsIsTmjZ37EB2cGg7nUV8y1uyKIDk0CUg3njckhIfpoWL599Jf15EUO2m1tkCcehcRQrEQX4XQ==",
- "type": "package",
- "path": "System.Threading.Tasks.Parallel/4.0.1",
- "files": [
- "System.Threading.Tasks.Parallel.4.0.1.nupkg.sha512",
- "System.Threading.Tasks.Parallel.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Threading.Tasks.Parallel.dll",
- "lib/netstandard1.3/System.Threading.Tasks.Parallel.dll",
- "lib/portable-net45+win8+wpa81/_._",
- "lib/win8/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Threading.Tasks.Parallel.dll",
- "ref/netcore50/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/de/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/es/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/fr/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/it/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/ja/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/ko/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/ru/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/zh-hans/System.Threading.Tasks.Parallel.xml",
- "ref/netcore50/zh-hant/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/System.Threading.Tasks.Parallel.dll",
- "ref/netstandard1.1/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/de/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/es/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/fr/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/it/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/ja/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/ko/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/ru/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/zh-hans/System.Threading.Tasks.Parallel.xml",
- "ref/netstandard1.1/zh-hant/System.Threading.Tasks.Parallel.xml",
- "ref/portable-net45+win8+wpa81/_._",
- "ref/win8/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Threading.Thread/4.0.0": {
- "sha512": "NRqCZ+KcpDqPa8pgFLiUAdE1xEh4iI01lIwLxEjImlzPveSo3EuS0xJgLZHT5eOg7BZ4yfTuuT/3JmXi0aJ0IA==",
- "type": "package",
- "path": "System.Threading.Thread/4.0.0",
- "files": [
- "System.Threading.Thread.4.0.0.nupkg.sha512",
- "System.Threading.Thread.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Threading.Thread.dll",
- "lib/netcore50/_._",
- "lib/netstandard1.3/System.Threading.Thread.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Threading.Thread.dll",
- "ref/netstandard1.3/System.Threading.Thread.dll",
- "ref/netstandard1.3/System.Threading.Thread.xml",
- "ref/netstandard1.3/de/System.Threading.Thread.xml",
- "ref/netstandard1.3/es/System.Threading.Thread.xml",
- "ref/netstandard1.3/fr/System.Threading.Thread.xml",
- "ref/netstandard1.3/it/System.Threading.Thread.xml",
- "ref/netstandard1.3/ja/System.Threading.Thread.xml",
- "ref/netstandard1.3/ko/System.Threading.Thread.xml",
- "ref/netstandard1.3/ru/System.Threading.Thread.xml",
- "ref/netstandard1.3/zh-hans/System.Threading.Thread.xml",
- "ref/netstandard1.3/zh-hant/System.Threading.Thread.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Threading.ThreadPool/4.0.10": {
- "sha512": "PqObppfzXpCiZ4oVYhvDQCeqgcb3jMYCdAzZcBmu2e4toUKxauZccbgV0LAqGpoHNbPuMzQYvcSFsidjHM/b6w==",
- "type": "package",
- "path": "System.Threading.ThreadPool/4.0.10",
- "files": [
- "System.Threading.ThreadPool.4.0.10.nupkg.sha512",
- "System.Threading.ThreadPool.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Threading.ThreadPool.dll",
- "lib/netcore50/_._",
- "lib/netstandard1.3/System.Threading.ThreadPool.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Threading.ThreadPool.dll",
- "ref/netstandard1.3/System.Threading.ThreadPool.dll",
- "ref/netstandard1.3/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/de/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/es/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/fr/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/it/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/ja/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/ko/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/ru/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/zh-hans/System.Threading.ThreadPool.xml",
- "ref/netstandard1.3/zh-hant/System.Threading.ThreadPool.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Threading.Timer/4.0.1": {
- "sha512": "XqyRQNBWn8ufOUunRZSOb3pvCw8yFYNEcdsFv7Fweln9kM3tewTPdQYqFWM8dSF7l0xvE6IVc6plNkPVq+JSKQ==",
- "type": "package",
- "path": "System.Threading.Timer/4.0.1",
- "files": [
- "System.Threading.Timer.4.0.1.nupkg.sha512",
- "System.Threading.Timer.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net451/_._",
- "lib/portable-net451+win81+wpa81/_._",
- "lib/win81/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net451/_._",
- "ref/netcore50/System.Threading.Timer.dll",
- "ref/netcore50/System.Threading.Timer.xml",
- "ref/netcore50/de/System.Threading.Timer.xml",
- "ref/netcore50/es/System.Threading.Timer.xml",
- "ref/netcore50/fr/System.Threading.Timer.xml",
- "ref/netcore50/it/System.Threading.Timer.xml",
- "ref/netcore50/ja/System.Threading.Timer.xml",
- "ref/netcore50/ko/System.Threading.Timer.xml",
- "ref/netcore50/ru/System.Threading.Timer.xml",
- "ref/netcore50/zh-hans/System.Threading.Timer.xml",
- "ref/netcore50/zh-hant/System.Threading.Timer.xml",
- "ref/netstandard1.2/System.Threading.Timer.dll",
- "ref/netstandard1.2/System.Threading.Timer.xml",
- "ref/netstandard1.2/de/System.Threading.Timer.xml",
- "ref/netstandard1.2/es/System.Threading.Timer.xml",
- "ref/netstandard1.2/fr/System.Threading.Timer.xml",
- "ref/netstandard1.2/it/System.Threading.Timer.xml",
- "ref/netstandard1.2/ja/System.Threading.Timer.xml",
- "ref/netstandard1.2/ko/System.Threading.Timer.xml",
- "ref/netstandard1.2/ru/System.Threading.Timer.xml",
- "ref/netstandard1.2/zh-hans/System.Threading.Timer.xml",
- "ref/netstandard1.2/zh-hant/System.Threading.Timer.xml",
- "ref/portable-net451+win81+wpa81/_._",
- "ref/win81/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Xml.ReaderWriter/4.0.11": {
- "sha512": "dHSnMBUB+j+IaErbR/agsq+dhUq7LOK4YD6Hi9oT1lqcTCJlVNUafBu6UYIRJl/uyHBZDztSvJn0AsUjJsCUNQ==",
- "type": "package",
- "path": "System.Xml.ReaderWriter/4.0.11",
- "files": [
- "System.Xml.ReaderWriter.4.0.11.nupkg.sha512",
- "System.Xml.ReaderWriter.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Xml.ReaderWriter.dll",
- "lib/netstandard1.3/System.Xml.ReaderWriter.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Xml.ReaderWriter.dll",
- "ref/netcore50/System.Xml.ReaderWriter.xml",
- "ref/netcore50/de/System.Xml.ReaderWriter.xml",
- "ref/netcore50/es/System.Xml.ReaderWriter.xml",
- "ref/netcore50/fr/System.Xml.ReaderWriter.xml",
- "ref/netcore50/it/System.Xml.ReaderWriter.xml",
- "ref/netcore50/ja/System.Xml.ReaderWriter.xml",
- "ref/netcore50/ko/System.Xml.ReaderWriter.xml",
- "ref/netcore50/ru/System.Xml.ReaderWriter.xml",
- "ref/netcore50/zh-hans/System.Xml.ReaderWriter.xml",
- "ref/netcore50/zh-hant/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/System.Xml.ReaderWriter.dll",
- "ref/netstandard1.0/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/de/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/es/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/fr/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/it/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/ja/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/ko/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/ru/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/zh-hans/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.0/zh-hant/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/System.Xml.ReaderWriter.dll",
- "ref/netstandard1.3/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/de/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/es/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/fr/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/it/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/ja/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/ko/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/ru/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/zh-hans/System.Xml.ReaderWriter.xml",
- "ref/netstandard1.3/zh-hant/System.Xml.ReaderWriter.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Xml.XDocument/4.0.11": {
- "sha512": "XLHQfydc7p2RbCzj5ihEHGdqBWoxvcvEJqHp6Ai3GSfI0V8AaDf3EiJGz7OxUmsJ9Ul+Y3BqptgdaJJ+xwEbhQ==",
- "type": "package",
- "path": "System.Xml.XDocument/4.0.11",
- "files": [
- "System.Xml.XDocument.4.0.11.nupkg.sha512",
- "System.Xml.XDocument.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net45/_._",
- "lib/netcore50/System.Xml.XDocument.dll",
- "lib/netstandard1.3/System.Xml.XDocument.dll",
- "lib/portable-net45+win8+wp8+wpa81/_._",
- "lib/win8/_._",
- "lib/wp80/_._",
- "lib/wpa81/_._",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net45/_._",
- "ref/netcore50/System.Xml.XDocument.dll",
- "ref/netcore50/System.Xml.XDocument.xml",
- "ref/netcore50/de/System.Xml.XDocument.xml",
- "ref/netcore50/es/System.Xml.XDocument.xml",
- "ref/netcore50/fr/System.Xml.XDocument.xml",
- "ref/netcore50/it/System.Xml.XDocument.xml",
- "ref/netcore50/ja/System.Xml.XDocument.xml",
- "ref/netcore50/ko/System.Xml.XDocument.xml",
- "ref/netcore50/ru/System.Xml.XDocument.xml",
- "ref/netcore50/zh-hans/System.Xml.XDocument.xml",
- "ref/netcore50/zh-hant/System.Xml.XDocument.xml",
- "ref/netstandard1.0/System.Xml.XDocument.dll",
- "ref/netstandard1.0/System.Xml.XDocument.xml",
- "ref/netstandard1.0/de/System.Xml.XDocument.xml",
- "ref/netstandard1.0/es/System.Xml.XDocument.xml",
- "ref/netstandard1.0/fr/System.Xml.XDocument.xml",
- "ref/netstandard1.0/it/System.Xml.XDocument.xml",
- "ref/netstandard1.0/ja/System.Xml.XDocument.xml",
- "ref/netstandard1.0/ko/System.Xml.XDocument.xml",
- "ref/netstandard1.0/ru/System.Xml.XDocument.xml",
- "ref/netstandard1.0/zh-hans/System.Xml.XDocument.xml",
- "ref/netstandard1.0/zh-hant/System.Xml.XDocument.xml",
- "ref/netstandard1.3/System.Xml.XDocument.dll",
- "ref/netstandard1.3/System.Xml.XDocument.xml",
- "ref/netstandard1.3/de/System.Xml.XDocument.xml",
- "ref/netstandard1.3/es/System.Xml.XDocument.xml",
- "ref/netstandard1.3/fr/System.Xml.XDocument.xml",
- "ref/netstandard1.3/it/System.Xml.XDocument.xml",
- "ref/netstandard1.3/ja/System.Xml.XDocument.xml",
- "ref/netstandard1.3/ko/System.Xml.XDocument.xml",
- "ref/netstandard1.3/ru/System.Xml.XDocument.xml",
- "ref/netstandard1.3/zh-hans/System.Xml.XDocument.xml",
- "ref/netstandard1.3/zh-hant/System.Xml.XDocument.xml",
- "ref/portable-net45+win8+wp8+wpa81/_._",
- "ref/win8/_._",
- "ref/wp80/_._",
- "ref/wpa81/_._",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Xml.XmlDocument/4.0.1": {
- "sha512": "N+iCqYdwMsMbCJwmq0GLQ3LcqbNHAykiDiOAxPMAvtbUjQCkJ6rnmA1056PcHCn2+mYQMNYvSNkeuB2MkMlXhg==",
- "type": "package",
- "path": "System.Xml.XmlDocument/4.0.1",
- "files": [
- "System.Xml.XmlDocument.4.0.1.nupkg.sha512",
- "System.Xml.XmlDocument.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Xml.XmlDocument.dll",
- "lib/netstandard1.3/System.Xml.XmlDocument.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Xml.XmlDocument.dll",
- "ref/netstandard1.3/System.Xml.XmlDocument.dll",
- "ref/netstandard1.3/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/de/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/es/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/fr/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/it/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/ja/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/ko/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/ru/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/zh-hans/System.Xml.XmlDocument.xml",
- "ref/netstandard1.3/zh-hant/System.Xml.XmlDocument.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Xml.XPath/4.0.1": {
- "sha512": "IEz24tPX9CmGFq3/ml1FrqFfZhIWUdWGcCcYb8o8C5c49QxE8oddNicB7+s7leqkoc9y+iwX+ROV4czAry5MxA==",
- "type": "package",
- "path": "System.Xml.XPath/4.0.1",
- "files": [
- "System.Xml.XPath.4.0.1.nupkg.sha512",
- "System.Xml.XPath.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Xml.XPath.dll",
- "lib/netstandard1.3/System.Xml.XPath.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Xml.XPath.dll",
- "ref/netstandard1.3/System.Xml.XPath.dll",
- "ref/netstandard1.3/System.Xml.XPath.xml",
- "ref/netstandard1.3/de/System.Xml.XPath.xml",
- "ref/netstandard1.3/es/System.Xml.XPath.xml",
- "ref/netstandard1.3/fr/System.Xml.XPath.xml",
- "ref/netstandard1.3/it/System.Xml.XPath.xml",
- "ref/netstandard1.3/ja/System.Xml.XPath.xml",
- "ref/netstandard1.3/ko/System.Xml.XPath.xml",
- "ref/netstandard1.3/ru/System.Xml.XPath.xml",
- "ref/netstandard1.3/zh-hans/System.Xml.XPath.xml",
- "ref/netstandard1.3/zh-hant/System.Xml.XPath.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- },
- "System.Xml.XPath.XDocument/4.0.1": {
- "sha512": "Ss+3IwdbmGeUvnRogYM6WhQjP7uxp/wlXMa/GlZLv4HR+xlazQxxJkDA55IhLePeuSC/fkNiIY1W1QvfYnVf/g==",
- "type": "package",
- "path": "System.Xml.XPath.XDocument/4.0.1",
- "files": [
- "System.Xml.XPath.XDocument.4.0.1.nupkg.sha512",
- "System.Xml.XPath.XDocument.nuspec",
- "ThirdPartyNotices.txt",
- "dotnet_library_license.txt",
- "lib/MonoAndroid10/_._",
- "lib/MonoTouch10/_._",
- "lib/net46/System.Xml.XPath.XDocument.dll",
- "lib/netstandard1.3/System.Xml.XPath.XDocument.dll",
- "lib/xamarinios10/_._",
- "lib/xamarinmac20/_._",
- "lib/xamarintvos10/_._",
- "lib/xamarinwatchos10/_._",
- "ref/MonoAndroid10/_._",
- "ref/MonoTouch10/_._",
- "ref/net46/System.Xml.XPath.XDocument.dll",
- "ref/netstandard1.3/System.Xml.XPath.XDocument.dll",
- "ref/netstandard1.3/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/de/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/es/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/fr/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/it/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/ja/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/ko/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/ru/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/zh-hans/System.Xml.XPath.XDocument.xml",
- "ref/netstandard1.3/zh-hant/System.Xml.XPath.XDocument.xml",
- "ref/xamarinios10/_._",
- "ref/xamarinmac20/_._",
- "ref/xamarintvos10/_._",
- "ref/xamarinwatchos10/_._"
- ]
- }
- },
- "projectFileDependencyGroups": {
- "": [
- "Newtonsoft.Json >= 9.0.1"
- ],
- ".NETCoreApp,Version=v1.0": [
- "Microsoft.NETCore.App >= 1.0.1"
- ]
- },
- "tools": {},
- "projectFileToolGroups": {}
-}
\ No newline at end of file
diff --git a/tests/JSONTestSuite/parsers/test_Lua_JSON/JSON.lua b/tests/JSONTestSuite/parsers/test_Lua_JSON/JSON.lua
deleted file mode 100644
index cb9d54f7c..000000000
--- a/tests/JSONTestSuite/parsers/test_Lua_JSON/JSON.lua
+++ /dev/null
@@ -1,1451 +0,0 @@
--- -*- coding: utf-8 -*-
---
--- Simple JSON encoding and decoding in pure Lua.
---
--- Copyright 2010-2016 Jeffrey Friedl
--- http://regex.info/blog/
--- Latest version: http://regex.info/blog/lua/json
---
--- This code is released under a Creative Commons CC-BY "Attribution" License:
--- http://creativecommons.org/licenses/by/3.0/deed.en_US
---
--- It can be used for any purpose so long as the copyright notice above,
--- the web-page links above, and the 'AUTHOR_NOTE' string below are
--- maintained. Enjoy.
---
-local VERSION = 20160916.19 -- version history at end of file
-local AUTHOR_NOTE = "-[ JSON.lua package by Jeffrey Friedl (http://regex.info/blog/lua/json) version 20160916.19 ]-"
-
---
--- The 'AUTHOR_NOTE' variable exists so that information about the source
--- of the package is maintained even in compiled versions. It's also
--- included in OBJDEF below mostly to quiet warnings about unused variables.
---
-local OBJDEF = {
- VERSION = VERSION,
- AUTHOR_NOTE = AUTHOR_NOTE,
-}
-
-
---
--- Simple JSON encoding and decoding in pure Lua.
--- JSON definition: http://www.json.org/
---
---
--- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines
---
--- local lua_value = JSON:decode(raw_json_text)
---
--- local raw_json_text = JSON:encode(lua_table_or_value)
--- local pretty_json_text = JSON:encode_pretty(lua_table_or_value) -- "pretty printed" version for human readability
---
---
---
--- DECODING (from a JSON string to a Lua table)
---
---
--- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines
---
--- local lua_value = JSON:decode(raw_json_text)
---
--- If the JSON text is for an object or an array, e.g.
--- { "what": "books", "count": 3 }
--- or
--- [ "Larry", "Curly", "Moe" ]
---
--- the result is a Lua table, e.g.
--- { what = "books", count = 3 }
--- or
--- { "Larry", "Curly", "Moe" }
---
---
--- The encode and decode routines accept an optional second argument,
--- "etc", which is not used during encoding or decoding, but upon error
--- is passed along to error handlers. It can be of any type (including nil).
---
---
---
--- ERROR HANDLING
---
--- With most errors during decoding, this code calls
---
--- JSON:onDecodeError(message, text, location, etc)
---
--- with a message about the error, and if known, the JSON text being
--- parsed and the byte count where the problem was discovered. You can
--- replace the default JSON:onDecodeError() with your own function.
---
--- The default onDecodeError() merely augments the message with data
--- about the text and the location if known (and if a second 'etc'
--- argument had been provided to decode(), its value is tacked onto the
--- message as well), and then calls JSON.assert(), which itself defaults
--- to Lua's built-in assert(), and can also be overridden.
---
--- For example, in an Adobe Lightroom plugin, you might use something like
---
--- function JSON:onDecodeError(message, text, location, etc)
--- LrErrors.throwUserError("Internal Error: invalid JSON data")
--- end
---
--- or even just
---
--- function JSON.assert(message)
--- LrErrors.throwUserError("Internal Error: " .. message)
--- end
---
--- If JSON:decode() is passed a nil, this is called instead:
---
--- JSON:onDecodeOfNilError(message, nil, nil, etc)
---
--- and if JSON:decode() is passed HTML instead of JSON, this is called:
---
--- JSON:onDecodeOfHTMLError(message, text, nil, etc)
---
--- The use of the fourth 'etc' argument allows stronger coordination
--- between decoding and error reporting, especially when you provide your
--- own error-handling routines. Continuing with the the Adobe Lightroom
--- plugin example:
---
--- function JSON:onDecodeError(message, text, location, etc)
--- local note = "Internal Error: invalid JSON data"
--- if type(etc) = 'table' and etc.photo then
--- note = note .. " while processing for " .. etc.photo:getFormattedMetadata('fileName')
--- end
--- LrErrors.throwUserError(note)
--- end
---
--- :
--- :
---
--- for i, photo in ipairs(photosToProcess) do
--- :
--- :
--- local data = JSON:decode(someJsonText, { photo = photo })
--- :
--- :
--- end
---
---
---
---
---
--- DECODING AND STRICT TYPES
---
--- Because both JSON objects and JSON arrays are converted to Lua tables,
--- it's not normally possible to tell which original JSON type a
--- particular Lua table was derived from, or guarantee decode-encode
--- round-trip equivalency.
---
--- However, if you enable strictTypes, e.g.
---
--- JSON = assert(loadfile "JSON.lua")() --load the routines
--- JSON.strictTypes = true
---
--- then the Lua table resulting from the decoding of a JSON object or
--- JSON array is marked via Lua metatable, so that when re-encoded with
--- JSON:encode() it ends up as the appropriate JSON type.
---
--- (This is not the default because other routines may not work well with
--- tables that have a metatable set, for example, Lightroom API calls.)
---
---
--- ENCODING (from a lua table to a JSON string)
---
--- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines
---
--- local raw_json_text = JSON:encode(lua_table_or_value)
--- local pretty_json_text = JSON:encode_pretty(lua_table_or_value) -- "pretty printed" version for human readability
--- local custom_pretty = JSON:encode(lua_table_or_value, etc, { pretty = true, indent = "| ", align_keys = false })
---
--- On error during encoding, this code calls:
---
--- JSON:onEncodeError(message, etc)
---
--- which you can override in your local JSON object.
---
--- The 'etc' in the error call is the second argument to encode()
--- and encode_pretty(), or nil if it wasn't provided.
---
---
--- ENCODING OPTIONS
---
--- An optional third argument, a table of options, can be provided to encode().
---
--- encode_options = {
--- -- options for making "pretty" human-readable JSON (see "PRETTY-PRINTING" below)
--- pretty = true,
--- indent = " ",
--- align_keys = false,
---
--- -- other output-related options
--- null = "\0", -- see "ENCODING JSON NULL VALUES" below
--- stringsAreUtf8 = false, -- see "HANDLING UNICODE LINE AND PARAGRAPH SEPARATORS FOR JAVA" below
--- }
---
--- json_string = JSON:encode(mytable, etc, encode_options)
---
---
---
--- For reference, the defaults are:
---
--- pretty = false
--- null = nil,
--- stringsAreUtf8 = false,
---
---
---
--- PRETTY-PRINTING
---
--- Enabling the 'pretty' encode option helps generate human-readable JSON.
---
--- pretty = JSON:encode(val, etc, {
--- pretty = true,
--- indent = " ",
--- align_keys = false,
--- })
---
--- encode_pretty() is also provided: it's identical to encode() except
--- that encode_pretty() provides a default options table if none given in the call:
---
--- { pretty = true, align_keys = false, indent = " " }
---
--- For example, if
---
--- JSON:encode(data)
---
--- produces:
---
--- {"city":"Kyoto","climate":{"avg_temp":16,"humidity":"high","snowfall":"minimal"},"country":"Japan","wards":11}
---
--- then
---
--- JSON:encode_pretty(data)
---
--- produces:
---
--- {
--- "city": "Kyoto",
--- "climate": {
--- "avg_temp": 16,
--- "humidity": "high",
--- "snowfall": "minimal"
--- },
--- "country": "Japan",
--- "wards": 11
--- }
---
--- The following three lines return identical results:
--- JSON:encode_pretty(data)
--- JSON:encode_pretty(data, nil, { pretty = true, align_keys = false, indent = " " })
--- JSON:encode (data, nil, { pretty = true, align_keys = false, indent = " " })
---
--- An example of setting your own indent string:
---
--- JSON:encode_pretty(data, nil, { pretty = true, indent = "| " })
---
--- produces:
---
--- {
--- | "city": "Kyoto",
--- | "climate": {
--- | | "avg_temp": 16,
--- | | "humidity": "high",
--- | | "snowfall": "minimal"
--- | },
--- | "country": "Japan",
--- | "wards": 11
--- }
---
--- An example of setting align_keys to true:
---
--- JSON:encode_pretty(data, nil, { pretty = true, indent = " ", align_keys = true })
---
--- produces:
---
--- {
--- "city": "Kyoto",
--- "climate": {
--- "avg_temp": 16,
--- "humidity": "high",
--- "snowfall": "minimal"
--- },
--- "country": "Japan",
--- "wards": 11
--- }
---
--- which I must admit is kinda ugly, sorry. This was the default for
--- encode_pretty() prior to version 20141223.14.
---
---
--- HANDLING UNICODE LINE AND PARAGRAPH SEPARATORS FOR JAVA
---
--- If the 'stringsAreUtf8' encode option is set to true, consider Lua strings not as a sequence of bytes,
--- but as a sequence of UTF-8 characters.
---
--- Currently, the only practical effect of setting this option is that Unicode LINE and PARAGRAPH
--- separators, if found in a string, are encoded with a JSON escape instead of being dumped as is.
--- The JSON is valid either way, but encoding this way, apparently, allows the resulting JSON
--- to also be valid Java.
---
--- AMBIGUOUS SITUATIONS DURING THE ENCODING
---
--- During the encode, if a Lua table being encoded contains both string
--- and numeric keys, it fits neither JSON's idea of an object, nor its
--- idea of an array. To get around this, when any string key exists (or
--- when non-positive numeric keys exist), numeric keys are converted to
--- strings.
---
--- For example,
--- JSON:encode({ "one", "two", "three", SOMESTRING = "some string" }))
--- produces the JSON object
--- {"1":"one","2":"two","3":"three","SOMESTRING":"some string"}
---
--- To prohibit this conversion and instead make it an error condition, set
--- JSON.noKeyConversion = true
---
---
--- ENCODING JSON NULL VALUES
---
--- Lua tables completely omit keys whose value is nil, so without special handling there's
--- no way to get a field in a JSON object with a null value. For example
--- JSON:encode({ username = "admin", password = nil })
--- produces
--- {"username":"admin"}
---
--- In order to actually produce
--- {"username":"admin", "password":null}
--- one can include a string value for a "null" field in the options table passed to encode()....
--- any Lua table entry with that value becomes null in the JSON output:
--- JSON:encode({ username = "admin", password = "xyzzy" }, nil, { null = "xyzzy" })
--- produces
--- {"username":"admin", "password":null}
---
--- Just be sure to use a string that is otherwise unlikely to appear in your data.
--- The string "\0" (a string with one null byte) may well be appropriate for many applications.
---
--- The "null" options also applies to Lua tables that become JSON arrays.
--- JSON:encode({ "one", "two", nil, nil })
--- produces
--- ["one","two"]
--- while
--- NULL = "\0"
--- JSON:encode({ "one", "two", NULL, NULL}, nil, { null = NULL })
--- produces
--- ["one","two",null,null]
---
---
---
---
--- HANDLING LARGE AND/OR PRECISE NUMBERS
---
---
--- Without special handling, numbers in JSON can lose precision in Lua.
--- For example:
---
--- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }')
---
--- print("small: ", type(T.small), T.small)
--- print("big: ", type(T.big), T.big)
--- print("precise: ", type(T.precise), T.precise)
---
--- produces
---
--- small: number 12345
--- big: number 1.2345678901235e+28
--- precise: number 9876.6789012346
---
--- Precision is lost with both 'big' and 'precise'.
---
--- This package offers ways to try to handle this better (for some definitions of "better")...
---
--- The most precise method is by setting the global:
---
--- JSON.decodeNumbersAsObjects = true
---
--- When this is set, numeric JSON data is encoded into Lua in a form that preserves the exact
--- JSON numeric presentation when re-encoded back out to JSON, or accessed in Lua as a string.
---
--- (This is done by encoding the numeric data with a Lua table/metatable that returns
--- the possibly-imprecise numeric form when accessed numerically, but the original precise
--- representation when accessed as a string. You can also explicitly access
--- via JSON:forceString() and JSON:forceNumber())
---
--- Consider the example above, with this option turned on:
---
--- JSON.decodeNumbersAsObjects = true
---
--- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }')
---
--- print("small: ", type(T.small), T.small)
--- print("big: ", type(T.big), T.big)
--- print("precise: ", type(T.precise), T.precise)
---
--- This now produces:
---
--- small: table 12345
--- big: table 12345678901234567890123456789
--- precise: table 9876.67890123456789012345
---
--- However, within Lua you can still use the values (e.g. T.precise in the example above) in numeric
--- contexts. In such cases you'll get the possibly-imprecise numeric version, but in string contexts
--- and when the data finds its way to this package's encode() function, the original full-precision
--- representation is used.
---
--- Even without using the JSON.decodeNumbersAsObjects option, you can encode numbers
--- in your Lua table that retain high precision upon encoding to JSON, by using the JSON:asNumber()
--- function:
---
--- T = {
--- imprecise = 123456789123456789.123456789123456789,
--- precise = JSON:asNumber("123456789123456789.123456789123456789")
--- }
---
--- print(JSON:encode_pretty(T))
---
--- This produces:
---
--- {
--- "precise": 123456789123456789.123456789123456789,
--- "imprecise": 1.2345678912346e+17
--- }
---
---
---
--- A different way to handle big/precise JSON numbers is to have decode() merely return
--- the exact string representation of the number instead of the number itself.
--- This approach might be useful when the numbers are merely some kind of opaque
--- object identifier and you want to work with them in Lua as strings anyway.
---
--- This approach is enabled by setting
---
--- JSON.decodeIntegerStringificationLength = 10
---
--- The value is the number of digits (of the integer part of the number) at which to stringify numbers.
---
--- Consider our previous example with this option set to 10:
---
--- JSON.decodeIntegerStringificationLength = 10
---
--- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }')
---
--- print("small: ", type(T.small), T.small)
--- print("big: ", type(T.big), T.big)
--- print("precise: ", type(T.precise), T.precise)
---
--- This produces:
---
--- small: number 12345
--- big: string 12345678901234567890123456789
--- precise: number 9876.6789012346
---
--- The long integer of the 'big' field is at least JSON.decodeIntegerStringificationLength digits
--- in length, so it's converted not to a Lua integer but to a Lua string. Using a value of 0 or 1 ensures
--- that all JSON numeric data becomes strings in Lua.
---
--- Note that unlike
--- JSON.decodeNumbersAsObjects = true
--- this stringification is simple and unintelligent: the JSON number simply becomes a Lua string, and that's the end of it.
--- If the string is then converted back to JSON, it's still a string. After running the code above, adding
--- print(JSON:encode(T))
--- produces
--- {"big":"12345678901234567890123456789","precise":9876.6789012346,"small":12345}
--- which is unlikely to be desired.
---
--- There's a comparable option for the length of the decimal part of a number:
---
--- JSON.decodeDecimalStringificationLength
---
--- This can be used alone or in conjunction with
---
--- JSON.decodeIntegerStringificationLength
---
--- to trip stringification on precise numbers with at least JSON.decodeIntegerStringificationLength digits after
--- the decimal point.
---
--- This example:
---
--- JSON.decodeIntegerStringificationLength = 10
--- JSON.decodeDecimalStringificationLength = 5
---
--- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }')
---
--- print("small: ", type(T.small), T.small)
--- print("big: ", type(T.big), T.big)
--- print("precise: ", type(T.precise), T.precise)
---
--- produces:
---
--- small: number 12345
--- big: string 12345678901234567890123456789
--- precise: string 9876.67890123456789012345
---
---
---
---
---
--- SUMMARY OF METHODS YOU CAN OVERRIDE IN YOUR LOCAL LUA JSON OBJECT
---
--- assert
--- onDecodeError
--- onDecodeOfNilError
--- onDecodeOfHTMLError
--- onEncodeError
---
--- If you want to create a separate Lua JSON object with its own error handlers,
--- you can reload JSON.lua or use the :new() method.
---
----------------------------------------------------------------------------
-
-local default_pretty_indent = " "
-local default_pretty_options = { pretty = true, align_keys = false, indent = default_pretty_indent }
-
-local isArray = { __tostring = function() return "JSON array" end } isArray.__index = isArray
-local isObject = { __tostring = function() return "JSON object" end } isObject.__index = isObject
-
-function OBJDEF:newArray(tbl)
- return setmetatable(tbl or {}, isArray)
-end
-
-function OBJDEF:newObject(tbl)
- return setmetatable(tbl or {}, isObject)
-end
-
-
-
-
-local function getnum(op)
- return type(op) == 'number' and op or op.N
-end
-
-local isNumber = {
- __tostring = function(T) return T.S end,
- __unm = function(op) return getnum(op) end,
-
- __concat = function(op1, op2) return tostring(op1) .. tostring(op2) end,
- __add = function(op1, op2) return getnum(op1) + getnum(op2) end,
- __sub = function(op1, op2) return getnum(op1) - getnum(op2) end,
- __mul = function(op1, op2) return getnum(op1) * getnum(op2) end,
- __div = function(op1, op2) return getnum(op1) / getnum(op2) end,
- __mod = function(op1, op2) return getnum(op1) % getnum(op2) end,
- __pow = function(op1, op2) return getnum(op1) ^ getnum(op2) end,
- __lt = function(op1, op2) return getnum(op1) < getnum(op2) end,
- __eq = function(op1, op2) return getnum(op1) == getnum(op2) end,
- __le = function(op1, op2) return getnum(op1) <= getnum(op2) end,
-}
-isNumber.__index = isNumber
-
-function OBJDEF:asNumber(item)
-
- if getmetatable(item) == isNumber then
- -- it's already a JSON number object.
- return item
- elseif type(item) == 'table' and type(item.S) == 'string' and type(item.N) == 'number' then
- -- it's a number-object table that lost its metatable, so give it one
- return setmetatable(item, isNumber)
- else
- -- the normal situation... given a number or a string representation of a number....
- local holder = {
- S = tostring(item), -- S is the representation of the number as a string, which remains precise
- N = tonumber(item), -- N is the number as a Lua number.
- }
- return setmetatable(holder, isNumber)
- end
-end
-
---
--- Given an item that might be a normal string or number, or might be an 'isNumber' object defined above,
--- return the string version. This shouldn't be needed often because the 'isNumber' object should autoconvert
--- to a string in most cases, but it's here to allow it to be forced when needed.
---
-function OBJDEF:forceString(item)
- if type(item) == 'table' and type(item.S) == 'string' then
- return item.S
- else
- return tostring(item)
- end
-end
-
---
--- Given an item that might be a normal string or number, or might be an 'isNumber' object defined above,
--- return the numeric version.
---
-function OBJDEF:forceNumber(item)
- if type(item) == 'table' and type(item.N) == 'number' then
- return item.N
- else
- return tonumber(item)
- end
-end
-
-
-local function unicode_codepoint_as_utf8(codepoint)
- --
- -- codepoint is a number
- --
- if codepoint <= 127 then
- return string.char(codepoint)
-
- elseif codepoint <= 2047 then
- --
- -- 110yyyxx 10xxxxxx <-- useful notation from http://en.wikipedia.org/wiki/Utf8
- --
- local highpart = math.floor(codepoint / 0x40)
- local lowpart = codepoint - (0x40 * highpart)
- return string.char(0xC0 + highpart,
- 0x80 + lowpart)
-
- elseif codepoint <= 65535 then
- --
- -- 1110yyyy 10yyyyxx 10xxxxxx
- --
- local highpart = math.floor(codepoint / 0x1000)
- local remainder = codepoint - 0x1000 * highpart
- local midpart = math.floor(remainder / 0x40)
- local lowpart = remainder - 0x40 * midpart
-
- highpart = 0xE0 + highpart
- midpart = 0x80 + midpart
- lowpart = 0x80 + lowpart
-
- --
- -- Check for an invalid character (thanks Andy R. at Adobe).
- -- See table 3.7, page 93, in http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf#G28070
- --
- if ( highpart == 0xE0 and midpart < 0xA0 ) or
- ( highpart == 0xED and midpart > 0x9F ) or
- ( highpart == 0xF0 and midpart < 0x90 ) or
- ( highpart == 0xF4 and midpart > 0x8F )
- then
- return "?"
- else
- return string.char(highpart,
- midpart,
- lowpart)
- end
-
- else
- --
- -- 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
- --
- local highpart = math.floor(codepoint / 0x40000)
- local remainder = codepoint - 0x40000 * highpart
- local midA = math.floor(remainder / 0x1000)
- remainder = remainder - 0x1000 * midA
- local midB = math.floor(remainder / 0x40)
- local lowpart = remainder - 0x40 * midB
-
- return string.char(0xF0 + highpart,
- 0x80 + midA,
- 0x80 + midB,
- 0x80 + lowpart)
- end
-end
-
-function OBJDEF:onDecodeError(message, text, location, etc)
- if text then
- if location then
- message = string.format("%s at char %d of: %s", message, location, text)
- else
- message = string.format("%s: %s", message, text)
- end
- end
-
- if etc ~= nil then
- message = message .. " (" .. OBJDEF:encode(etc) .. ")"
- end
-
- if self.assert then
- self.assert(false, message)
- else
- assert(false, message)
- end
-end
-
-OBJDEF.onDecodeOfNilError = OBJDEF.onDecodeError
-OBJDEF.onDecodeOfHTMLError = OBJDEF.onDecodeError
-
-function OBJDEF:onEncodeError(message, etc)
- if etc ~= nil then
- message = message .. " (" .. OBJDEF:encode(etc) .. ")"
- end
-
- if self.assert then
- self.assert(false, message)
- else
- assert(false, message)
- end
-end
-
-local function grok_number(self, text, start, options)
- --
- -- Grab the integer part
- --
- local integer_part = text:match('^-?[1-9]%d*', start)
- or text:match("^-?0", start)
-
- if not integer_part then
- self:onDecodeError("expected number", text, start, options.etc)
- end
-
- local i = start + integer_part:len()
-
- --
- -- Grab an optional decimal part
- --
- local decimal_part = text:match('^%.%d+', i) or ""
-
- i = i + decimal_part:len()
-
- --
- -- Grab an optional exponential part
- --
- local exponent_part = text:match('^[eE][-+]?%d+', i) or ""
-
- i = i + exponent_part:len()
-
- local full_number_text = integer_part .. decimal_part .. exponent_part
-
- if options.decodeNumbersAsObjects then
- return OBJDEF:asNumber(full_number_text), i
- end
-
- --
- -- If we're told to stringify under certain conditions, so do.
- -- We punt a bit when there's an exponent by just stringifying no matter what.
- -- I suppose we should really look to see whether the exponent is actually big enough one
- -- way or the other to trip stringification, but I'll be lazy about it until someone asks.
- --
- if (options.decodeIntegerStringificationLength
- and
- (integer_part:len() >= options.decodeIntegerStringificationLength or exponent_part:len() > 0))
-
- or
-
- (options.decodeDecimalStringificationLength
- and
- (decimal_part:len() >= options.decodeDecimalStringificationLength or exponent_part:len() > 0))
- then
- return full_number_text, i -- this returns the exact string representation seen in the original JSON
- end
-
-
-
- local as_number = tonumber(full_number_text)
-
- if not as_number then
- self:onDecodeError("bad number", text, start, options.etc)
- end
-
- return as_number, i
-end
-
-
-local function grok_string(self, text, start, options)
-
- if text:sub(start,start) ~= '"' then
- self:onDecodeError("expected string's opening quote", text, start, options.etc)
- end
-
- local i = start + 1 -- +1 to bypass the initial quote
- local text_len = text:len()
- local VALUE = ""
- while i <= text_len do
- local c = text:sub(i,i)
- if c == '"' then
- return VALUE, i + 1
- end
- if c ~= '\\' then
- VALUE = VALUE .. c
- i = i + 1
- elseif text:match('^\\b', i) then
- VALUE = VALUE .. "\b"
- i = i + 2
- elseif text:match('^\\f', i) then
- VALUE = VALUE .. "\f"
- i = i + 2
- elseif text:match('^\\n', i) then
- VALUE = VALUE .. "\n"
- i = i + 2
- elseif text:match('^\\r', i) then
- VALUE = VALUE .. "\r"
- i = i + 2
- elseif text:match('^\\t', i) then
- VALUE = VALUE .. "\t"
- i = i + 2
- else
- local hex = text:match('^\\u([0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i)
- if hex then
- i = i + 6 -- bypass what we just read
-
- -- We have a Unicode codepoint. It could be standalone, or if in the proper range and
- -- followed by another in a specific range, it'll be a two-code surrogate pair.
- local codepoint = tonumber(hex, 16)
- if codepoint >= 0xD800 and codepoint <= 0xDBFF then
- -- it's a hi surrogate... see whether we have a following low
- local lo_surrogate = text:match('^\\u([dD][cdefCDEF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i)
- if lo_surrogate then
- i = i + 6 -- bypass the low surrogate we just read
- codepoint = 0x2400 + (codepoint - 0xD800) * 0x400 + tonumber(lo_surrogate, 16)
- else
- -- not a proper low, so we'll just leave the first codepoint as is and spit it out.
- end
- end
- VALUE = VALUE .. unicode_codepoint_as_utf8(codepoint)
-
- else
-
- -- just pass through what's escaped
- VALUE = VALUE .. text:match('^\\(.)', i)
- i = i + 2
- end
- end
- end
-
- self:onDecodeError("unclosed string", text, start, options.etc)
-end
-
-local function skip_whitespace(text, start)
-
- local _, match_end = text:find("^[ \n\r\t]+", start) -- [http://www.ietf.org/rfc/rfc4627.txt] Section 2
- if match_end then
- return match_end + 1
- else
- return start
- end
-end
-
-local grok_one -- assigned later
-
-local function grok_object(self, text, start, options)
-
- if text:sub(start,start) ~= '{' then
- self:onDecodeError("expected '{'", text, start, options.etc)
- end
-
- local i = skip_whitespace(text, start + 1) -- +1 to skip the '{'
-
- local VALUE = self.strictTypes and self:newObject { } or { }
-
- if text:sub(i,i) == '}' then
- return VALUE, i + 1
- end
- local text_len = text:len()
- while i <= text_len do
- local key, new_i = grok_string(self, text, i, options)
-
- i = skip_whitespace(text, new_i)
-
- if text:sub(i, i) ~= ':' then
- self:onDecodeError("expected colon", text, i, options.etc)
- end
-
- i = skip_whitespace(text, i + 1)
-
- local new_val, new_i = grok_one(self, text, i, options)
-
- VALUE[key] = new_val
-
- --
- -- Expect now either '}' to end things, or a ',' to allow us to continue.
- --
- i = skip_whitespace(text, new_i)
-
- local c = text:sub(i,i)
-
- if c == '}' then
- return VALUE, i + 1
- end
-
- if text:sub(i, i) ~= ',' then
- self:onDecodeError("expected comma or '}'", text, i, options.etc)
- end
-
- i = skip_whitespace(text, i + 1)
- end
-
- self:onDecodeError("unclosed '{'", text, start, options.etc)
-end
-
-local function grok_array(self, text, start, options)
- if text:sub(start,start) ~= '[' then
- self:onDecodeError("expected '['", text, start, options.etc)
- end
-
- local i = skip_whitespace(text, start + 1) -- +1 to skip the '['
- local VALUE = self.strictTypes and self:newArray { } or { }
- if text:sub(i,i) == ']' then
- return VALUE, i + 1
- end
-
- local VALUE_INDEX = 1
-
- local text_len = text:len()
- while i <= text_len do
- local val, new_i = grok_one(self, text, i, options)
-
- -- can't table.insert(VALUE, val) here because it's a no-op if val is nil
- VALUE[VALUE_INDEX] = val
- VALUE_INDEX = VALUE_INDEX + 1
-
- i = skip_whitespace(text, new_i)
-
- --
- -- Expect now either ']' to end things, or a ',' to allow us to continue.
- --
- local c = text:sub(i,i)
- if c == ']' then
- return VALUE, i + 1
- end
- if text:sub(i, i) ~= ',' then
- self:onDecodeError("expected comma or '['", text, i, options.etc)
- end
- i = skip_whitespace(text, i + 1)
- end
- self:onDecodeError("unclosed '['", text, start, options.etc)
-end
-
-
-grok_one = function(self, text, start, options)
- -- Skip any whitespace
- start = skip_whitespace(text, start)
-
- if start > text:len() then
- self:onDecodeError("unexpected end of string", text, nil, options.etc)
- end
-
- if text:find('^"', start) then
- return grok_string(self, text, start, options.etc)
-
- elseif text:find('^[-0123456789 ]', start) then
- return grok_number(self, text, start, options)
-
- elseif text:find('^%{', start) then
- return grok_object(self, text, start, options)
-
- elseif text:find('^%[', start) then
- return grok_array(self, text, start, options)
-
- elseif text:find('^true', start) then
- return true, start + 4
-
- elseif text:find('^false', start) then
- return false, start + 5
-
- elseif text:find('^null', start) then
- return nil, start + 4
-
- else
- self:onDecodeError("can't parse JSON", text, start, options.etc)
- end
-end
-
-function OBJDEF:decode(text, etc, options)
- --
- -- If the user didn't pass in a table of decode options, make an empty one.
- --
- if type(options) ~= 'table' then
- options = {}
- end
-
- --
- -- If they passed in an 'etc' argument, stuff it into the options.
- -- (If not, any 'etc' field in the options they passed in remains to be used)
- --
- if etc ~= nil then
- options.etc = etc
- end
-
-
- if type(self) ~= 'table' or self.__index ~= OBJDEF then
- OBJDEF:onDecodeError("JSON:decode must be called in method format", nil, nil, options.etc)
- end
-
- if text == nil then
- self:onDecodeOfNilError(string.format("nil passed to JSON:decode()"), nil, nil, options.etc)
- elseif type(text) ~= 'string' then
- self:onDecodeError(string.format("expected string argument to JSON:decode(), got %s", type(text)), nil, nil, options.etc)
- end
-
- if text:match('^%s*$') then
- return nil
- end
-
- if text:match('^%s*<') then
- -- Can't be JSON... we'll assume it's HTML
- self:onDecodeOfHTMLError(string.format("html passed to JSON:decode()"), text, nil, options.etc)
- end
-
- --
- -- Ensure that it's not UTF-32 or UTF-16.
- -- Those are perfectly valid encodings for JSON (as per RFC 4627 section 3),
- -- but this package can't handle them.
- --
- if text:sub(1,1):byte() == 0 or (text:len() >= 2 and text:sub(2,2):byte() == 0) then
- self:onDecodeError("JSON package groks only UTF-8, sorry", text, nil, options.etc)
- end
-
- --
- -- apply global options
- --
- if options.decodeNumbersAsObjects == nil then
- options.decodeNumbersAsObjects = self.decodeNumbersAsObjects
- end
- if options.decodeIntegerStringificationLength == nil then
- options.decodeIntegerStringificationLength = self.decodeIntegerStringificationLength
- end
- if options.decodeDecimalStringificationLength == nil then
- options.decodeDecimalStringificationLength = self.decodeDecimalStringificationLength
- end
-
- local success, value = pcall(grok_one, self, text, 1, options)
-
- if success then
- return value
- else
- -- if JSON:onDecodeError() didn't abort out of the pcall, we'll have received the error message here as "value", so pass it along as an assert.
- if self.assert then
- self.assert(false, value)
- else
- assert(false, value)
- end
- -- and if we're still here, return a nil and throw the error message on as a second arg
- return nil, value
- end
-end
-
-local function backslash_replacement_function(c)
- if c == "\n" then
- return "\\n"
- elseif c == "\r" then
- return "\\r"
- elseif c == "\t" then
- return "\\t"
- elseif c == "\b" then
- return "\\b"
- elseif c == "\f" then
- return "\\f"
- elseif c == '"' then
- return '\\"'
- elseif c == '\\' then
- return '\\\\'
- else
- return string.format("\\u%04x", c:byte())
- end
-end
-
-local chars_to_be_escaped_in_JSON_string
- = '['
- .. '"' -- class sub-pattern to match a double quote
- .. '%\\' -- class sub-pattern to match a backslash
- .. '%z' -- class sub-pattern to match a null
- .. '\001' .. '-' .. '\031' -- class sub-pattern to match control characters
- .. ']'
-
-
-local LINE_SEPARATOR_as_utf8 = unicode_codepoint_as_utf8(0x2028)
-local PARAGRAPH_SEPARATOR_as_utf8 = unicode_codepoint_as_utf8(0x2029)
-local function json_string_literal(value, options)
- local newval = value:gsub(chars_to_be_escaped_in_JSON_string, backslash_replacement_function)
- if options.stringsAreUtf8 then
- --
- -- This feels really ugly to just look into a string for the sequence of bytes that we know to be a particular utf8 character,
- -- but utf8 was designed purposefully to make this kind of thing possible. Still, feels dirty.
- -- I'd rather decode the byte stream into a character stream, but it's not technically needed so
- -- not technically worth it.
- --
- newval = newval:gsub(LINE_SEPARATOR_as_utf8, '\\u2028'):gsub(PARAGRAPH_SEPARATOR_as_utf8,'\\u2029')
- end
- return '"' .. newval .. '"'
-end
-
-local function object_or_array(self, T, etc)
- --
- -- We need to inspect all the keys... if there are any strings, we'll convert to a JSON
- -- object. If there are only numbers, it's a JSON array.
- --
- -- If we'll be converting to a JSON object, we'll want to sort the keys so that the
- -- end result is deterministic.
- --
- local string_keys = { }
- local number_keys = { }
- local number_keys_must_be_strings = false
- local maximum_number_key
-
- for key in pairs(T) do
- if type(key) == 'string' then
- table.insert(string_keys, key)
- elseif type(key) == 'number' then
- table.insert(number_keys, key)
- if key <= 0 or key >= math.huge then
- number_keys_must_be_strings = true
- elseif not maximum_number_key or key > maximum_number_key then
- maximum_number_key = key
- end
- else
- self:onEncodeError("can't encode table with a key of type " .. type(key), etc)
- end
- end
-
- if #string_keys == 0 and not number_keys_must_be_strings then
- --
- -- An empty table, or a numeric-only array
- --
- if #number_keys > 0 then
- return nil, maximum_number_key -- an array
- elseif tostring(T) == "JSON array" then
- return nil
- elseif tostring(T) == "JSON object" then
- return { }
- else
- -- have to guess, so we'll pick array, since empty arrays are likely more common than empty objects
- return nil
- end
- end
-
- table.sort(string_keys)
-
- local map
- if #number_keys > 0 then
- --
- -- If we're here then we have either mixed string/number keys, or numbers inappropriate for a JSON array
- -- It's not ideal, but we'll turn the numbers into strings so that we can at least create a JSON object.
- --
-
- if self.noKeyConversion then
- self:onEncodeError("a table with both numeric and string keys could be an object or array; aborting", etc)
- end
-
- --
- -- Have to make a shallow copy of the source table so we can remap the numeric keys to be strings
- --
- map = { }
- for key, val in pairs(T) do
- map[key] = val
- end
-
- table.sort(number_keys)
-
- --
- -- Throw numeric keys in there as strings
- --
- for _, number_key in ipairs(number_keys) do
- local string_key = tostring(number_key)
- if map[string_key] == nil then
- table.insert(string_keys , string_key)
- map[string_key] = T[number_key]
- else
- self:onEncodeError("conflict converting table with mixed-type keys into a JSON object: key " .. number_key .. " exists both as a string and a number.", etc)
- end
- end
- end
-
- return string_keys, nil, map
-end
-
---
--- Encode
---
--- 'options' is nil, or a table with possible keys:
---
--- pretty -- If true, return a pretty-printed version.
---
--- indent -- A string (usually of spaces) used to indent each nested level.
---
--- align_keys -- If true, align all the keys when formatting a table.
---
--- null -- If this exists with a string value, table elements with this value are output as JSON null.
---
--- stringsAreUtf8 -- If true, consider Lua strings not as a sequence of bytes, but as a sequence of UTF-8 characters.
--- (Currently, the only practical effect of setting this option is that Unicode LINE and PARAGRAPH
--- separators, if found in a string, are encoded with a JSON escape instead of as raw UTF-8.
--- The JSON is valid either way, but encoding this way, apparently, allows the resulting JSON
--- to also be valid Java.)
---
---
-local encode_value -- must predeclare because it calls itself
-function encode_value(self, value, parents, etc, options, indent, for_key)
-
- --
- -- keys in a JSON object can never be null, so we don't even consider options.null when converting a key value
- --
- if value == nil or (not for_key and options and options.null and value == options.null) then
- return 'null'
-
- elseif type(value) == 'string' then
- return json_string_literal(value, options)
-
- elseif type(value) == 'number' then
- if value ~= value then
- --
- -- NaN (Not a Number).
- -- JSON has no NaN, so we have to fudge the best we can. This should really be a package option.
- --
- return "null"
- elseif value >= math.huge then
- --
- -- Positive infinity. JSON has no INF, so we have to fudge the best we can. This should
- -- really be a package option. Note: at least with some implementations, positive infinity
- -- is both ">= math.huge" and "<= -math.huge", which makes no sense but that's how it is.
- -- Negative infinity is properly "<= -math.huge". So, we must be sure to check the ">="
- -- case first.
- --
- return "1e+9999"
- elseif value <= -math.huge then
- --
- -- Negative infinity.
- -- JSON has no INF, so we have to fudge the best we can. This should really be a package option.
- --
- return "-1e+9999"
- else
- return tostring(value)
- end
-
- elseif type(value) == 'boolean' then
- return tostring(value)
-
- elseif type(value) ~= 'table' then
- self:onEncodeError("can't convert " .. type(value) .. " to JSON", etc)
-
- elseif getmetatable(value) == isNumber then
- return tostring(value)
- else
- --
- -- A table to be converted to either a JSON object or array.
- --
- local T = value
-
- if type(options) ~= 'table' then
- options = {}
- end
- if type(indent) ~= 'string' then
- indent = ""
- end
-
- if parents[T] then
- self:onEncodeError("table " .. tostring(T) .. " is a child of itself", etc)
- else
- parents[T] = true
- end
-
- local result_value
-
- local object_keys, maximum_number_key, map = object_or_array(self, T, etc)
- if maximum_number_key then
- --
- -- An array...
- --
- local ITEMS = { }
- for i = 1, maximum_number_key do
- table.insert(ITEMS, encode_value(self, T[i], parents, etc, options, indent))
- end
-
- if options.pretty then
- result_value = "[ " .. table.concat(ITEMS, ", ") .. " ]"
- else
- result_value = "[" .. table.concat(ITEMS, ",") .. "]"
- end
-
- elseif object_keys then
- --
- -- An object
- --
- local TT = map or T
-
- if options.pretty then
-
- local KEYS = { }
- local max_key_length = 0
- for _, key in ipairs(object_keys) do
- local encoded = encode_value(self, tostring(key), parents, etc, options, indent, true)
- if options.align_keys then
- max_key_length = math.max(max_key_length, #encoded)
- end
- table.insert(KEYS, encoded)
- end
- local key_indent = indent .. tostring(options.indent or "")
- local subtable_indent = key_indent .. string.rep(" ", max_key_length) .. (options.align_keys and " " or "")
- local FORMAT = "%s%" .. string.format("%d", max_key_length) .. "s: %s"
-
- local COMBINED_PARTS = { }
- for i, key in ipairs(object_keys) do
- local encoded_val = encode_value(self, TT[key], parents, etc, options, subtable_indent)
- table.insert(COMBINED_PARTS, string.format(FORMAT, key_indent, KEYS[i], encoded_val))
- end
- result_value = "{\n" .. table.concat(COMBINED_PARTS, ",\n") .. "\n" .. indent .. "}"
-
- else
-
- local PARTS = { }
- for _, key in ipairs(object_keys) do
- local encoded_val = encode_value(self, TT[key], parents, etc, options, indent)
- local encoded_key = encode_value(self, tostring(key), parents, etc, options, indent, true)
- table.insert(PARTS, string.format("%s:%s", encoded_key, encoded_val))
- end
- result_value = "{" .. table.concat(PARTS, ",") .. "}"
-
- end
- else
- --
- -- An empty array/object... we'll treat it as an array, though it should really be an option
- --
- result_value = "[]"
- end
-
- parents[T] = false
- return result_value
- end
-end
-
-
-function OBJDEF:encode(value, etc, options)
- if type(self) ~= 'table' or self.__index ~= OBJDEF then
- OBJDEF:onEncodeError("JSON:encode must be called in method format", etc)
- end
-
- --
- -- If the user didn't pass in a table of decode options, make an empty one.
- --
- if type(options) ~= 'table' then
- options = {}
- end
-
- return encode_value(self, value, {}, etc, options)
-end
-
-function OBJDEF:encode_pretty(value, etc, options)
- if type(self) ~= 'table' or self.__index ~= OBJDEF then
- OBJDEF:onEncodeError("JSON:encode_pretty must be called in method format", etc)
- end
-
- --
- -- If the user didn't pass in a table of decode options, use the default pretty ones
- --
- if type(options) ~= 'table' then
- options = default_pretty_options
- end
-
- return encode_value(self, value, {}, etc, options)
-end
-
-function OBJDEF.__tostring()
- return "JSON encode/decode package"
-end
-
-OBJDEF.__index = OBJDEF
-
-function OBJDEF:new(args)
- local new = { }
-
- if args then
- for key, val in pairs(args) do
- new[key] = val
- end
- end
-
- return setmetatable(new, OBJDEF)
-end
-
-return OBJDEF:new()
-
---
--- Version history:
---
--- 20160916.19 Fixed the isNumber.__index assignment (thanks to Jack Taylor)
---
--- 20160730.18 Added JSON:forceString() and JSON:forceNumber()
---
--- 20160728.17 Added concatenation to the metatable for JSON:asNumber()
---
--- 20160709.16 Could crash if not passed an options table (thanks jarno heikkinen ).
---
--- Made JSON:asNumber() a bit more resilient to being passed the results of itself.
---
--- 20160526.15 Added the ability to easily encode null values in JSON, via the new "null" encoding option.
--- (Thanks to Adam B for bringing up the issue.)
---
--- Added some support for very large numbers and precise floats via
--- JSON.decodeNumbersAsObjects
--- JSON.decodeIntegerStringificationLength
--- JSON.decodeDecimalStringificationLength
---
--- Added the "stringsAreUtf8" encoding option. (Hat tip to http://lua-users.org/wiki/JsonModules )
---
--- 20141223.14 The encode_pretty() routine produced fine results for small datasets, but isn't really
--- appropriate for anything large, so with help from Alex Aulbach I've made the encode routines
--- more flexible, and changed the default encode_pretty() to be more generally useful.
---
--- Added a third 'options' argument to the encode() and encode_pretty() routines, to control
--- how the encoding takes place.
---
--- Updated docs to add assert() call to the loadfile() line, just as good practice so that
--- if there is a problem loading JSON.lua, the appropriate error message will percolate up.
---
--- 20140920.13 Put back (in a way that doesn't cause warnings about unused variables) the author string,
--- so that the source of the package, and its version number, are visible in compiled copies.
---
--- 20140911.12 Minor lua cleanup.
--- Fixed internal reference to 'JSON.noKeyConversion' to reference 'self' instead of 'JSON'.
--- (Thanks to SmugMug's David Parry for these.)
---
--- 20140418.11 JSON nulls embedded within an array were being ignored, such that
--- ["1",null,null,null,null,null,"seven"],
--- would return
--- {1,"seven"}
--- It's now fixed to properly return
--- {1, nil, nil, nil, nil, nil, "seven"}
--- Thanks to "haddock" for catching the error.
---
--- 20140116.10 The user's JSON.assert() wasn't always being used. Thanks to "blue" for the heads up.
---
--- 20131118.9 Update for Lua 5.3... it seems that tostring(2/1) produces "2.0" instead of "2",
--- and this caused some problems.
---
--- 20131031.8 Unified the code for encode() and encode_pretty(); they had been stupidly separate,
--- and had of course diverged (encode_pretty didn't get the fixes that encode got, so
--- sometimes produced incorrect results; thanks to Mattie for the heads up).
---
--- Handle encoding tables with non-positive numeric keys (unlikely, but possible).
---
--- If a table has both numeric and string keys, or its numeric keys are inappropriate
--- (such as being non-positive or infinite), the numeric keys are turned into
--- string keys appropriate for a JSON object. So, as before,
--- JSON:encode({ "one", "two", "three" })
--- produces the array
--- ["one","two","three"]
--- but now something with mixed key types like
--- JSON:encode({ "one", "two", "three", SOMESTRING = "some string" }))
--- instead of throwing an error produces an object:
--- {"1":"one","2":"two","3":"three","SOMESTRING":"some string"}
---
--- To maintain the prior throw-an-error semantics, set
--- JSON.noKeyConversion = true
---
--- 20131004.7 Release under a Creative Commons CC-BY license, which I should have done from day one, sorry.
---
--- 20130120.6 Comment update: added a link to the specific page on my blog where this code can
--- be found, so that folks who come across the code outside of my blog can find updates
--- more easily.
---
--- 20111207.5 Added support for the 'etc' arguments, for better error reporting.
---
--- 20110731.4 More feedback from David Kolf on how to make the tests for Nan/Infinity system independent.
---
--- 20110730.3 Incorporated feedback from David Kolf at http://lua-users.org/wiki/JsonModules:
---
--- * When encoding lua for JSON, Sparse numeric arrays are now handled by
--- spitting out full arrays, such that
--- JSON:encode({"one", "two", [10] = "ten"})
--- returns
--- ["one","two",null,null,null,null,null,null,null,"ten"]
---
--- In 20100810.2 and earlier, only up to the first non-null value would have been retained.
---
--- * When encoding lua for JSON, numeric value NaN gets spit out as null, and infinity as "1+e9999".
--- Version 20100810.2 and earlier created invalid JSON in both cases.
---
--- * Unicode surrogate pairs are now detected when decoding JSON.
---
--- 20100810.2 added some checking to ensure that an invalid Unicode character couldn't leak in to the UTF-8 encoding
---
--- 20100731.1 initial public release
---
diff --git a/tests/JSONTestSuite/parsers/test_Lua_JSON/test_JSON.lua b/tests/JSONTestSuite/parsers/test_Lua_JSON/test_JSON.lua
deleted file mode 100644
index ea839fd18..000000000
--- a/tests/JSONTestSuite/parsers/test_Lua_JSON/test_JSON.lua
+++ /dev/null
@@ -1,22 +0,0 @@
--- http://regex.info/blog/lua/json
-JSON = (loadfile "parsers/test_Lua_JSON/JSON.lua")() -- one-time load of the routines
-
-function readAll(file)
- local f = io.open(file, "rb")
- local content = f:read("*all")
- f:close()
- return content
-end
-
-local data = readAll(arg[1])
-
-local lua_value = JSON:decode(data)
-
-if lua_value == nil then
- print ("Error:", err)
- os.exit(1)
-end
-
-print ("--", lua_value )
-
-os.exit(0)
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/bin/test_ObjCNSJSONSerializer b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/bin/test_ObjCNSJSONSerializer
deleted file mode 100755
index 9cc6d9393..000000000
Binary files a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/bin/test_ObjCNSJSONSerializer and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.pbxproj b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d901808c..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,246 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 03A27D3B1D796BB600B2D016 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 03A27D3A1D796BB600B2D016 /* main.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 03A27D351D796BB600B2D016 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 03A27D371D796BB600B2D016 /* test_ObjCNSJSONSerializer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_ObjCNSJSONSerializer; sourceTree = BUILT_PRODUCTS_DIR; };
- 03A27D3A1D796BB600B2D016 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 03A27D341D796BB600B2D016 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 03A27D2E1D796BB600B2D016 = {
- isa = PBXGroup;
- children = (
- 03A27D391D796BB600B2D016 /* test_ObjCNSJSONSerializer */,
- 03A27D381D796BB600B2D016 /* Products */,
- );
- sourceTree = "";
- };
- 03A27D381D796BB600B2D016 /* Products */ = {
- isa = PBXGroup;
- children = (
- 03A27D371D796BB600B2D016 /* test_ObjCNSJSONSerializer */,
- );
- name = Products;
- sourceTree = "";
- };
- 03A27D391D796BB600B2D016 /* test_ObjCNSJSONSerializer */ = {
- isa = PBXGroup;
- children = (
- 03A27D3A1D796BB600B2D016 /* main.m */,
- );
- path = test_ObjCNSJSONSerializer;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 03A27D361D796BB600B2D016 /* test_ObjCNSJSONSerializer */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 03A27D3E1D796BB600B2D016 /* Build configuration list for PBXNativeTarget "test_ObjCNSJSONSerializer" */;
- buildPhases = (
- 03A27D331D796BB600B2D016 /* Sources */,
- 03A27D341D796BB600B2D016 /* Frameworks */,
- 03A27D351D796BB600B2D016 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = test_ObjCNSJSONSerializer;
- productName = test_ObjCNSJSONSerializer;
- productReference = 03A27D371D796BB600B2D016 /* test_ObjCNSJSONSerializer */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 03A27D2F1D796BB600B2D016 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0730;
- ORGANIZATIONNAME = Swissquote;
- TargetAttributes = {
- 03A27D361D796BB600B2D016 = {
- CreatedOnToolsVersion = 7.3.1;
- };
- };
- };
- buildConfigurationList = 03A27D321D796BB600B2D016 /* Build configuration list for PBXProject "test_ObjCNSJSONSerializer" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 03A27D2E1D796BB600B2D016;
- productRefGroup = 03A27D381D796BB600B2D016 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 03A27D361D796BB600B2D016 /* test_ObjCNSJSONSerializer */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 03A27D331D796BB600B2D016 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 03A27D3B1D796BB600B2D016 /* main.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 03A27D3C1D796BB600B2D016 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 03A27D3D1D796BB600B2D016 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 03A27D3F1D796BB600B2D016 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- 03A27D401D796BB600B2D016 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 03A27D321D796BB600B2D016 /* Build configuration list for PBXProject "test_ObjCNSJSONSerializer" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03A27D3C1D796BB600B2D016 /* Debug */,
- 03A27D3D1D796BB600B2D016 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 03A27D3E1D796BB600B2D016 /* Build configuration list for PBXNativeTarget "test_ObjCNSJSONSerializer" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 03A27D3F1D796BB600B2D016 /* Debug */,
- 03A27D401D796BB600B2D016 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 03A27D2F1D796BB600B2D016 /* Project object */;
-}
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 69a3fa694..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 6d05dbc27..000000000
Binary files a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/project.xcworkspace/xcuserdata/nst.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_ObjCNSJSONSerializer.xcscheme b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_ObjCNSJSONSerializer.xcscheme
deleted file mode 100644
index 07a42a313..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/test_ObjCNSJSONSerializer.xcscheme
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index f82c7588e..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer.xcodeproj/xcuserdata/nst.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- SchemeUserState
-
- test_ObjCNSJSONSerializer.xcscheme
-
- orderHint
- 0
-
-
- SuppressBuildableAutocreation
-
- 03A27D361D796BB600B2D016
-
- primary
-
-
-
-
-
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out
deleted file mode 100755
index 9327c5459..000000000
Binary files a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Info.plist b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Info.plist
deleted file mode 100644
index 3679a65b9..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleIdentifier
- com.apple.xcode.dsym.a.out
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundlePackageType
- dSYM
- CFBundleSignature
- ????
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
-
-
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Resources/DWARF/a.out b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Resources/DWARF/a.out
deleted file mode 100644
index db7651100..000000000
Binary files a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Resources/DWARF/a.out and /dev/null differ
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/findings_dir/plot_data b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/findings_dir/plot_data
deleted file mode 100644
index 4461bb2fb..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/findings_dir/plot_data
+++ /dev/null
@@ -1 +0,0 @@
-# unix_time, cycles_done, cur_path, paths_total, pending_total, pending_favs, map_size, unique_crashes, unique_hangs, max_depth, execs_per_sec
diff --git a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/main.m b/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/main.m
deleted file mode 100644
index 01305560d..000000000
--- a/tests/JSONTestSuite/parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/main.m
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// main.m
-// test_ObjCNSJSONSerializer
-//
-// Created by Nicolas Seriot on 02/09/16.
-// Copyright © 2016 Swissquote. All rights reserved.
-//
-
-#import
-
-int main(int argc, const char * argv[]) {
- @autoreleasepool {
-
- if ([[NSProcessInfo processInfo].arguments count] != 2) {
- NSLog(@"Usage: ./%@ file.json", [NSProcessInfo processInfo].arguments[0]);
- return 1;
- }
-
- NSString *path = [NSProcessInfo processInfo].arguments[1];
- NSURL *url = [NSURL fileURLWithPath:path];
- NSData *data = [NSData dataWithContentsOfURL:url];
-
- id o = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
-
- if (o == nil) {
- return 1;
- } else {
- NSLog(@"-- %@", o);
- }
- }
- return 0;
-}
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Accessors.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Accessors.swift
deleted file mode 100755
index 215d94fd1..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Accessors.swift
+++ /dev/null
@@ -1,255 +0,0 @@
-//
-// Accessors.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 10/9/15.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-public extension JSON {
- /// Returns `true` iff the receiver is `.null`.
- var isNull: Bool {
- switch self {
- case .null: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.bool`.
- var isBool: Bool {
- switch self {
- case .bool: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.string`.
- var isString: Bool {
- switch self {
- case .string: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.int64`.
- var isInt64: Bool {
- switch self {
- case .int64: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.double`.
- var isDouble: Bool {
- switch self {
- case .double: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.int64` or `.double`.
- var isNumber: Bool {
- switch self {
- case .int64, .double: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.object`.
- var isObject: Bool {
- switch self {
- case .object: return true
- default: return false
- }
- }
-
- /// Returns `true` iff the receiver is `.array`.
- var isArray: Bool {
- switch self {
- case .array: return true
- default: return false
- }
- }
-}
-
-public extension JSON {
- /// Returns the boolean value if the receiver is `.bool`, otherwise `nil`.
- ///
- /// When setting, replaces the receiver with the given boolean value, or with
- /// null if the value is `nil`.
- var bool: Bool? {
- get {
- switch self {
- case .bool(let b): return b
- default: return nil
- }
- }
- set {
- self = newValue.map(JSON.bool) ?? nil
- }
- }
-
- /// Returns the string value if the receiver is `.string`, otherwise `nil`.
- ///
- /// When setting, replaces the receiver with the given string value, or with
- /// null if the value is `nil`.
- var string: String? {
- get {
- switch self {
- case .string(let s): return s
- default: return nil
- }
- }
- set {
- self = newValue.map(JSON.string) ?? nil
- }
- }
-
- /// Returns the 64-bit integral value if the receiver is `.int64` or `.double`, otherwise `nil`.
- /// If the receiver is `.double`, the value is truncated. If it does not fit in 64 bits, `nil` is returned.
- ///
- /// When setting, replaces the receiver with the given integral value, or with
- /// null if the value is `nil`.
- var int64: Int64? {
- get {
- switch self {
- case .int64(let i): return i
- case .double(let d): return convertDoubleToInt64(d)
- default: return nil
- }
- } set {
- self = newValue.map(JSON.int64) ?? nil
- }
- }
-
- /// Returns the integral value if the receiver is `.int64` or `.double`, otherwise `nil`.
- /// If the receiver is `.double`, the value is truncated. If it does not fit in an `Int`, `nil` is returned.
- /// If the receiver is `.int64` and the value does not fit in an `Int`, `nil` is returned.
- ///
- /// When setting, replaces the receiver with the given integral value, or with
- /// null if the value is `nil`.
- var int: Int? {
- get {
- guard let value = self.int64 else { return nil}
- let truncated = Int(truncatingBitPattern: value)
- guard Int64(truncated) == value else { return nil }
- return truncated
- }
- set {
- self = newValue.map({ JSON.int64(Int64($0)) }) ?? nil
- }
- }
-
- /// Returns the numeric value as a `Double` if the receiver is `.int64` or `.double`, otherwise `nil`.
- ///
- /// When setting, replaces the receiver with the given double value, or with
- /// null if the value is `nil`.
- var double: Double? {
- get {
- switch self {
- case .int64(let i): return Double(i)
- case .double(let d): return d
- default: return nil
- }
- }
- set {
- self = newValue.map(JSON.double) ?? nil
- }
- }
-
- /// Returns the object dictionary if the receiver is `.object`, otherwise `nil`.
- ///
- /// When setting, replaces the receiver with the given object value, or with
- /// null if the value is `nil`.
- var object: JSONObject? {
- get {
- switch self {
- case .object(let obj): return obj
- default: return nil
- }
- }
- set {
- self = newValue.map(JSON.object) ?? nil
- }
- }
-
- /// Returns the array if the receiver is `.array`, otherwise `nil`.
- ///
- /// When setting, replaces the receiver with the given array value, or with
- /// null if the value is `nil`.
- var array: JSONArray? {
- get {
- switch self {
- case .array(let ary): return ary
- default: return nil
- }
- }
- set {
- self = newValue.map(JSON.array) ?? nil
- }
- }
-}
-
-public extension JSON {
- /// Returns the string value if the receiver is `.string`, coerces the value to a string if
- /// the receiver is `.bool`, `.null`, `.int64`, or `.double`, or otherwise returns `nil`.
- var asString: String? {
- return try? toString()
- }
-
- /// Returns the 64-bit integral value if the receiver is `.int64` or `.double`, coerces the value
- /// if the receiver is `.string`, otherwise returns `nil`.
- /// If the receiver is `.double`, the value is truncated. If it does not fit in 64 bits, `nil` is returned.
- /// If the receiver is `.string`, it must parse fully as an integral or floating-point number.
- /// If it parses as a floating-point number, it is truncated. If it does not fit in 64 bits, `nil` is returned.
- var asInt64: Int64? {
- return try? toInt64()
- }
-
- /// Returns the integral value if the receiver is `.int64` or `.double`, coerces the value
- /// if the receiver is `.string`, otherwise returns `nil`.
- /// If the receiver is `.double`, the value is truncated. If it does not fit in an `Int`, `nil` is returned.
- /// If the receiver is `.string`, it must parse fully as an integral or floating-point number.
- /// If it parses as a floating-point number, it is truncated. If it does not fit in an `Int`, `nil` is returned.
- var asInt: Int? {
- return try? toInt()
- }
-
- /// Returns the double value if the receiver is `.int64` or `.double`, coerces the value
- /// if the receiver is `.string`, otherwise returns `nil`.
- /// If the receiver is `.string`, it must parse fully as a floating-point number.
- var asDouble: Double? {
- return try? toDouble()
- }
-}
-
-public extension JSON {
- /// If the receiver is `.object`, returns the result of subscripting the object.
- /// Otherwise, returns `nil`.
- subscript(key: String) -> JSON? {
- return self.object?[key]
- }
-
- /// If the receiver is `.array` and the index is in range of the array, returns the result of subscripting the array.
- /// Otherwise returns `nil`.
- subscript(index: Int) -> JSON? {
- guard let ary = self.array else { return nil }
- guard index >= ary.startIndex && index < ary.endIndex else { return nil }
- return ary[index]
- }
-}
-
-internal func convertDoubleToInt64(_ d: Double) -> Int64? {
- // Int64(Double(Int64.max)) asserts because it interprets it as out of bounds.
- // Int64(Double(Int64.min)) works just fine.
- if d >= Double(Int64.max) || d < Double(Int64.min) {
- return nil
- }
- return Int64(d)
-}
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/DecimalNumber.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/DecimalNumber.swift
deleted file mode 100755
index b07666ae9..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/DecimalNumber.swift
+++ /dev/null
@@ -1,236 +0,0 @@
-//
-// DecimalNumber.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 2/8/16.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-#if os(iOS) || os(OSX) || os(tvOS) || os(watchOS)
-
- import Foundation
-
- // MARK: Basic accessors
-
- public extension JSON {
- /// Returns the receiver as an `NSDecimalNumber` if possible.
- /// - Returns: An `NSDecimalNumber` if the receiver is `.int64` or `.double`, or is a `.string`
- /// that contains a valid decimal number representation, otherwise `nil`.
- /// - Note: Whitespace is not allowed in the string representation.
- var asDecimalNumber: NSDecimalNumber? {
- switch self {
- case .int64(let i): return NSDecimalNumber(value: i)
- case .double(let d): return NSDecimalNumber(value: d)
- case .string(let s) where !s.isEmpty:
- // NSDecimalNumber(string:) doesn't tell us if the number was valid.
- // We could check for NaN, but that still doesn't tell us if there's anything left in the string.
- // I'm pretty sure it uses NSScanner.scanDecimal() internally, so we'll just use that instead.
- let scanner = Scanner(string: s)
- scanner.charactersToBeSkipped = nil
- var decimal = Decimal()
- if scanner.scanDecimal(&decimal) && scanner.isAtEnd {
- return NSDecimalNumber(decimal: decimal)
- }
- return nil
- default: return nil
- }
- }
-
- /// Returns the receiver as an `NSDecimalNumber` if it is `.int64` or `.double`.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the receiver is not an `.int64` or a `.double`.
- func getDecimalNumber() throws -> NSDecimalNumber {
- switch self {
- case .int64(let i): return NSDecimalNumber(value: i)
- case .double(let d): return NSDecimalNumber(value: d)
- default: throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self))
- }
- }
-
- /// Returns the receiver as an `NSDecimalNumber` if it is `.int64` or `.double`.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the receivre is `null`.
- /// - Throws: `JSONError` if the receiver is not an `.int64` or a `.double`.
- func getDecimalNumberOrNil() throws -> NSDecimalNumber? {
- switch self {
- case .int64(let i): return NSDecimalNumber(value: i)
- case .double(let d): return NSDecimalNumber(value: d)
- case .null: return nil
- default: throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self))
- }
- }
-
- /// Returns the receiver as an `NSDecimalNumber` if possible.
- /// - Returns: An `NSDecimalNumber` if the receiver is `.int64` or `.double`, or is a `.string`
- /// that contains a valid decimal number representation.
- /// - Throws: `JSONError` if the receiver is the wrong type, or is a `.string` that does not contain
- /// a valid decimal number representation.
- /// - Note: Whitespace is not allowed in the string representation.
- func toDecimalNumber() throws -> NSDecimalNumber {
- guard let value = asDecimalNumber else {
- throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self))
- }
- return value
- }
-
- /// Returns the receiver as an `NSDecimalNumber` if possible.
- /// - Returns: An `NSDecimalNumber` if the receiver is `.int64` or `.double`, or is a `.string`
- /// that contains a valid decimal number representation, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type, or is a `.string` that does not contain
- /// a valid decimal number representation.
- /// - Note: Whitespace is not allowed in the string representation.
- func toDecimalNumberOrNil() throws -> NSDecimalNumber? {
- if let value = asDecimalNumber { return value }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.number), actual: .forValue(self)) }
- }
- }
-
- // MARK: - Keyed accessors
-
- public extension JSON {
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getDecimalNumber(_ key: String) throws -> NSDecimalNumber {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.getDecimalNumber() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is the wrong type, or if the receiver is
- /// not an object.
- func getDecimalNumberOrNil(_ key: String) throws -> NSDecimalNumber? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getDecimalNumberOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, or a string that cannot be coerced to a decimal number, or if the
- /// receiver is not an object.
- func toDecimalNumber(_ key: String) throws -> NSDecimalNumber {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.toDecimalNumber() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a decimal number, or if the receiver is not an object.
- func toDecimalNumberOrNil(_ key: String) throws -> NSDecimalNumber? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.toDecimalNumberOrNil() }
- }
- }
-
- // MARK: - Indexed accessors
-
- public extension JSON {
- /// Subscripts the receiver with `index` and returns the result as an `NSDecimalNumber`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type, or if
- /// the receiver is not an array.
- func getDecimalNumber(_ index: Int) throws -> NSDecimalNumber {
- let array = try getArray()
- let value = try getRequired(array, index: index, type: .number)
- return try scoped(index) { try value.getDecimalNumber() }
- }
-
- /// Subscripts the receiver with `index` and returns the result as an `NSDecimalNumber`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value is the wrong type, or if the receiver is not an array.
- func getDecimalNumberOrNil(_ index: Int) throws -> NSDecimalNumber? {
- let array = try getArray()
- guard let value = array[safe: index] else { return nil }
- return try scoped(index) { try value.getDecimalNumberOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result as an `NSDecimalNumber`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the index is out of bounds or the value is `null`, a boolean,
- /// an object, an array, or a string that cannot be coerced to a decimal number, or
- /// if the receiver is not an array.
- func toDecimalNumber(_ index: Int) throws -> NSDecimalNumber {
- let array = try getArray()
- let value = try getRequired(array, index: index, type: .number)
- return try scoped(index) { try value.toDecimalNumber() }
- }
-
- /// Subscripts the receiver with `index` and returns the result as an `NSDecimalNumber`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a decimal number, or if the receiver is not an array.
- func toDecimalNumberOrNil(_ index: Int) throws -> NSDecimalNumber? {
- let array = try getArray()
- guard let value = array[safe: index] else { return nil }
- return try scoped(index) { try value.toDecimalNumberOrNil() }
- }
- }
-
- // MARK: -
-
- public extension JSONObject {
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getDecimalNumber(_ key: String) throws -> NSDecimalNumber {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.getDecimalNumber() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is the wrong type, or if the receiver is
- /// not an object.
- func getDecimalNumberOrNil(_ key: String) throws -> NSDecimalNumber? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getDecimalNumberOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, or a string that cannot be coerced to a decimal number, or if the
- /// receiver is not an object.
- func toDecimalNumber(_ key: String) throws -> NSDecimalNumber {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.toDecimalNumber() }
- }
-
- /// Subscripts the receiver with `key` and returns the result as an `NSDecimalNumber`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `NSDecimalNumber`, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a decimal number, or if the receiver is not an object.
- func toDecimalNumberOrNil(_ key: String) throws -> NSDecimalNumber? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.toDecimalNumberOrNil() }
- }
- }
-
-#endif // os(iOS) || os(OSX) || os(tvOS) || os(watchOS)
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Decoder.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Decoder.swift
deleted file mode 100755
index 0a9a0fe31..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Decoder.swift
+++ /dev/null
@@ -1,294 +0,0 @@
-//
-// Decoder.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 10/8/15.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-extension JSON {
- /// Decodes a string as JSON.
- /// - Parameter string: A string to parse as JSON.
- /// - Parameter strict: If `true`, trailing commas in arrays/objects are treated as an error. Defaults to `false`.
- /// - Returns: A `JSON` value.
- /// - Throws: `JSONParserError`
- public static func decode(_ string: String, strict: Bool = false) throws -> JSON {
- return try decode(string.unicodeScalars, strict: strict)
- }
-
- /// Decodes a sequence of `UnicodeScalar`s as JSON.
- /// - Parameter scalars: A sequence of `UnicodeScalar`s to parse as JSON.
- /// - Parameters strict: If `true`, trailing commas in arrays/objects are treated as an error. Defaults to `false`.
- /// - Returns: A `JSON` value.
- /// - Throws: `JSONParserError`
- public static func decode(_ scalars: Seq, strict: Bool = false) throws -> JSON where Seq.Iterator.Element == UnicodeScalar {
- var parser = JSONParser(scalars)
- parser.strict = strict
- var decoder = JSONDecoder(parser)
- return try decoder.decode()
- }
-
- /// Lazily decodes a string as a JSON stream.
- ///
- /// A JSON stream is a series of top-level JSON values. See `JSONStreamDecoder` for details.
- ///
- /// - Parameter string: A string to parse as a JSON stream.
- /// - Parameter strict: IF `true`, trailing commas in arrays/objects are treated as an error. Defaults to `false`.
- /// - Returns: A `JSONStreamDecoder`.
- public static func decodeStream(_ string: String, strict: Bool = false) -> JSONStreamDecoder> {
- return decodeStream(string.unicodeScalars, strict: strict)
- }
-
- /// Lazily decodes a sequence of `UnicodeScalar`s as a JSON stream.
- ///
- /// A JSON stream is a series of top-level JSON values. See `JSONStreamDecoder` for details.
- ///
- /// - Parameter scalars: A sequence of `UnicodeScalar`s to parse as a JSON stream.
- /// - Parameter strict: If `true`, trailing commas in arrays/objects are treated as an error. Defaults to `false`.
- /// - Returns: A `JSONStreamDecoder`.
- public static func decodeStream(_ scalars: Seq, strict: Bool = false) -> JSONStreamDecoder> where Seq.Iterator.Element == UnicodeScalar {
- var parser = JSONParser(scalars)
- parser.strict = strict
- parser.streaming = true
- return JSONStreamDecoder(parser)
- }
-}
-
-/// A JSON decoder that consumes a stream of JSON events.
-///
-/// In most cases, you should use the convenience method `JSON.decode(_:)` to decode values
-/// instead of using this class directly.
-///
-/// - SeeAlso: `JSONParser`.
-public struct JSONDecoder where Seq.Iterator: JSONEventIterator, Seq.Iterator.Element == JSONEvent {
- public init(_ parser: Seq) {
- iter = parser.makeIterator()
- }
-
- /// If `true`, the decoder will operate in streaming mode, allowing for multiple
- /// top-level json values, with each call to `decode()` returning a successive value.
- /// The default value of `false` means that `decode()` can only be called once, and
- /// any JSON events past the first top-level value are considered an error.
- ///
- /// See `decode()` for more details on the streaming operation.
- ///
- /// - Important: When wrapping a `JSONParser`, the parser must separately be put into
- /// streaming mode, as `JSONDecoder` operates generically over a sequence of `JSONEvent`s.
- public var streaming: Bool = false
-
- /// Decodes and returns a top-level JSON value from the event stream.
- ///
- /// When `streaming` is `false`, any events after the top-level value has been consumed
- /// will throw an error, and any subsequent calls to `decode()` after the first call
- /// will also throw an error. When `streaming` is `false`, after a top-level value has
- /// been decoded, no more events will be consumed, and `decode()` can be called repeatedly
- /// to decode more top-level events.
- ///
- /// Because the normal operation of this class is to decode one-shot values rather than
- /// streams, this method returns a non-optional value. As such, when operating in a
- /// streaming manner, this method will throw the special error `JSONDecoderError.streamEnded`
- /// to signal that there are no more values. To make this easier to work with, a convenience
- /// method `decodeStream()` is provided that returns an array of `JSON` values and automatically
- /// handles `JSONDecoderError.streamEnded`, and the type `JSONStreamDecoder` provides a
- /// lazy sequence interface to decoding a JSON stream.
- ///
- /// - Returns: A single top-level `JSON` value.
- ///
- /// - Throws: `JSONParserError`, `JSONDecoderError`.
- public mutating func decode() throws -> JSON {
- bump()
- if streaming && token == nil {
- throw JSONDecoderError.streamEnded
- }
- let result = try buildValue()
- if !streaming {
- bump()
- switch token {
- case .none: break
- case .some(.error(let err)): throw err
- case .some: throw JSONDecoderError.unexpectedToken
- }
- }
- return result
- }
-
- /// Decodes and returns an array of top-level JSON values from the event stream.
- ///
- /// This is a convenience method that sets `streaming` to `true` and then decodes
- /// as many top-level JSON values as it can before the stream ends.
- ///
- /// - Returns: An array of top-level `JSON` values.
- ///
- /// - SeeAlso: `JSONStreamDecoder`.
- public mutating func decodeStream() throws -> [JSON] {
- streaming = true
- var results: [JSON] = []
- repeat {
- do {
- results.append(try decode())
- } catch JSONDecoderError.streamEnded {
- return results
- }
- } while true
- }
-
- private mutating func bump() {
- token = iter.next()
- }
-
- private mutating func buildValue() throws -> JSON {
- switch token {
- case .objectStart?: return try buildObject()
- case .objectEnd?: throw error(.invalidSyntax)
- case .arrayStart?: return try buildArray()
- case .arrayEnd?: throw error(.invalidSyntax)
- case .booleanValue(let b)?: return .bool(b)
- case .int64Value(let i)?: return .int64(i)
- case .doubleValue(let d)?: return .double(d)
- case .stringValue(let s)?: return .string(s)
- case .nullValue?: return .null
- case .error(let err)?: throw err
- case nil: throw error(.unexpectedEOF)
- }
- }
-
- private mutating func buildObject() throws -> JSON {
- bump()
- var dict: [String: JSON] = Dictionary(minimumCapacity: objectHighWaterMark)
- defer { objectHighWaterMark = max(objectHighWaterMark, dict.count) }
- while let token = self.token {
- let key: String
- switch token {
- case .objectEnd: return .object(JSONObject(dict))
- case .error(let err): throw err
- case .stringValue(let s): key = s
- default: throw error(.nonStringKey)
- }
- bump()
- dict[key] = try buildValue()
- bump()
- }
- throw error(.unexpectedEOF)
- }
-
- private mutating func buildArray() throws -> JSON {
- bump()
- var ary: JSONArray = []
- while let token = self.token {
- if case .arrayEnd = token {
- return .array(ary)
- }
- ary.append(try buildValue())
- bump()
- }
- throw error(.unexpectedEOF)
- }
-
- private func error(_ code: JSONParserError.Code) -> JSONParserError {
- return JSONParserError(code: code, line: iter.line, column: iter.column)
- }
-
- private var iter: Seq.Iterator
- private var token: JSONEvent?
- private var objectHighWaterMark: Int = 0
-}
-
-/// Errors that may be thrown by the `JSONDecoder` during the decode stage.
-public enum JSONDecoderError: Error {
- /// Signals that a `JSONDecoder` operating in streaming mode has reached the end of the stream.
- case streamEnded
- /// Thrown when a `JSONDecoder` operating in one-shot mode finds extra tokens after the first top-level JSON value.
- case unexpectedToken
-}
-
-/// A JSON decoder that decodes a stream of JSON events into a lazy sequence of top-level JSON values.
-///
-/// This is a sequence of zero or more `JSONStreamValue.json` values, ending with zero or one `JSONStreamValue.error` value.
-///
-/// - Important: When wrapping a `JSONParser`, the parser must separately be put into streaming mode, as `JSONStreamDecoder`
-/// operates generically over a sequence of `JSONEvent`s. You should consider using `JSON.decodeStream(_:)` instead to
-/// create the stream decoder.
-///
-/// - SeeAlso: `JSON.decodeStream(_:)`.
-public struct JSONStreamDecoder: Sequence, IteratorProtocol where Seq.Iterator: JSONEventIterator, Seq.Iterator.Element == JSONEvent {
- public init(_ parser: Seq) {
- decoder = JSONDecoder(parser)
- decoder.streaming = true
- }
-
- /// Returns an array of all decoded values, or throws an error if one occurs.
- ///
- /// This eagerly decodes the rest of the JSON stream and returns all values. If a parse error occurs at any point,
- /// the error is thrown and all values are discarded.
- ///
- /// - Returns: An array of `JSON` values.
- /// - Throws: `JSONParserError`.
- public func values() throws -> [JSON] {
- return try map({ try $0.unwrap() })
- }
-
- public func makeIterator() -> JSONStreamDecoder {
- return self
- }
-
- public mutating func next() -> JSONStreamValue? {
- do {
- return try JSONStreamValue.json(decoder.decode())
- } catch JSONDecoderError.streamEnded {
- return nil
- } catch let error as JSONParserError {
- return JSONStreamValue.error(error)
- } catch {
- // This shouldn't be reachable. A `JSONDecoder` operating in streaming mode can throw only
- // `JSONParserError`s or `JSONDecoderError.streamEnded`.
- return nil
- }
- }
-
- private var decoder: JSONDecoder
-}
-
-public enum JSONStreamValue: Equatable {
- case json(JSON)
- case error(JSONParserError)
-
- /// Returns the contained `JSON` value, otherwise `nil`.
- public var json: JSON? {
- switch self {
- case .json(let json): return json
- case .error: return nil
- }
- }
-
- /// Returns the contained error, otherwise `nil`.
- public var error: JSONParserError? {
- switch self {
- case .json: return nil
- case .error(let error): return error
- }
- }
-
- /// Unwraps the contained `JSON` value or throws the contained error.
- ///
- /// - Throws: `JSONParserError`.
- public func unwrap() throws -> JSON {
- switch self {
- case .json(let value): return value
- case .error(let error): throw error
- }
- }
-
- public static func ==(lhs: JSONStreamValue, rhs: JSONStreamValue) -> Bool {
- switch (lhs, rhs) {
- case let (.json(a), .json(b)): return a == b
- case let (.error(a), .error(b)): return a == b
- default: return false
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Encoder.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Encoder.swift
deleted file mode 100755
index 2d34874fd..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Encoder.swift
+++ /dev/null
@@ -1,167 +0,0 @@
-//
-// Encoder.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 2/1/16.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-extension JSON {
- /// Encodes a `JSON` to a `String`.
- /// - Parameter json: The `JSON` to encode.
- /// - Parameter pretty: If `true`, include extra whitespace for formatting. Default is `false`.
- /// - Returns: A `String` with the JSON representation of *json*.
- public static func encodeAsString(_ json: JSON, pretty: Bool = false) -> String {
- var s = ""
- encode(json, toStream: &s, pretty: pretty)
- return s
- }
-
- /// Encodes a `JSON` to an output stream.
- /// - Parameter json: The `JSON` to encode.
- /// - Parameter stream: The output stream to write the encoded JSON to.
- /// - Parameter pretty: If `true`, include extra whitespace for formatting. Default is `false`.
- public static func encode(_ json: JSON, toStream stream: inout Target, pretty: Bool = false) {
- encode(json, toStream: &stream, indent: pretty ? 0 : nil)
- }
-
- private static func encode(_ json: JSON, toStream stream: inout Target, indent: Int?) {
- switch json {
- case .null: encodeNull(&stream)
- case .bool(let b): encodeBool(b, toStream: &stream)
- case .int64(let i): encodeInt64(i, toStream: &stream)
- case .double(let d): encodeDouble(d, toStream: &stream)
- case .string(let s): encodeString(s, toStream: &stream)
- case .object(let obj): encodeObject(obj, toStream: &stream, indent: indent)
- case .array(let ary): encodeArray(ary, toStream: &stream, indent: indent)
- }
- }
-
- private static func encodeNull(_ stream: inout Target) {
- stream.write("null")
- }
-
- private static func encodeBool(_ value: Bool, toStream stream: inout Target) {
- stream.write(value ? "true" : "false")
- }
-
- private static func encodeInt64(_ value: Int64, toStream stream: inout Target) {
- stream.write(String(value))
- }
-
- private static func encodeDouble(_ value: Double, toStream stream: inout Target) {
- stream.write(String(value))
- }
-
- private static func encodeString(_ value: String, toStream stream: inout Target) {
- stream.write("\"")
- let scalars = value.unicodeScalars
- var start = scalars.startIndex
- let end = scalars.endIndex
- var idx = start
- while idx < scalars.endIndex {
- let s: String
- let c = scalars[idx]
- switch c {
- case "\\": s = "\\\\"
- case "\"": s = "\\\""
- case "\n": s = "\\n"
- case "\r": s = "\\r"
- case "\t": s = "\\t"
- case "\u{8}": s = "\\b"
- case "\u{C}": s = "\\f"
- case "\0"..<"\u{10}":
- s = "\\u000\(String(c.value, radix: 16, uppercase: true))"
- case "\u{10}"..<" ":
- s = "\\u00\(String(c.value, radix: 16, uppercase: true))"
- default:
- idx = scalars.index(after: idx)
- continue
- }
- if idx != start {
- stream.write(String(scalars[start..(_ object: JSONObject, toStream stream: inout Target, indent: Int?) {
- let indented = indent.map({$0+1})
- if let indent = indented {
- stream.write("{\n")
- writeIndent(indent, toStream: &stream)
- } else {
- stream.write("{")
- }
- var first = true
- for (key, value) in object {
- if first {
- first = false
- } else if let indent = indented {
- stream.write(",\n")
- writeIndent(indent, toStream: &stream)
- } else {
- stream.write(",")
- }
- encodeString(key, toStream: &stream)
- stream.write(indented != nil ? ": " : ":")
- encode(value, toStream: &stream, indent: indented)
- }
- if let indent = indent {
- stream.write("\n")
- writeIndent(indent, toStream: &stream)
- }
- stream.write("}")
- }
-
- private static func encodeArray(_ array: JSONArray, toStream stream: inout Target, indent: Int?) {
- let indented = indent.map({$0+1})
- if let indent = indented {
- stream.write("[\n")
- writeIndent(indent, toStream: &stream)
- } else {
- stream.write("[")
- }
- var first = true
- for elt in array {
- if first {
- first = false
- } else if let indent = indented {
- stream.write(",\n")
- writeIndent(indent, toStream: &stream)
- } else {
- stream.write(",")
- }
- encode(elt, toStream: &stream, indent: indented)
- }
- if let indent = indent {
- stream.write("\n")
- writeIndent(indent, toStream: &stream)
- }
- stream.write("]")
- }
-
- private static func writeIndent(_ indent: Int, toStream stream: inout Target) {
- for _ in stride(from: 4, through: indent, by: 4) {
- stream.write(" ")
- }
- switch indent % 4 {
- case 1: stream.write(" ")
- case 2: stream.write(" ")
- case 3: stream.write(" ")
- default: break
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSON.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSON.swift
deleted file mode 100755
index d54e23fc6..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSON.swift
+++ /dev/null
@@ -1,170 +0,0 @@
-//
-// JSON.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 10/8/15.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-/// A single JSON-compatible value.
-public enum JSON {
- /// The null value.
- case null
- /// A boolean.
- case bool(Bool)
- /// A string.
- case string(String)
- /// A 64-bit integer.
- case int64(Int64)
- /// A number.
- /// When decoding, any integer that doesn't fit in 64 bits and any floating-point number
- /// is decoded as a `Double`.
- case double(Double)
- /// An object.
- case object(JSONObject)
- /// An array.
- case array(JSONArray)
-
- /// Initializes `self` as a boolean with the value `bool`.
- public init(_ bool: Bool) {
- self = .bool(bool)
- }
- /// Initializes `self` as a string with the value `str`.
- public init(_ str: String) {
- self = .string(str)
- }
- /// Initializes `self` as a 64-bit integer with the value `i`.
- public init(_ i: Int64) {
- self = .int64(i)
- }
- /// Initializes `self` as a double with the value `d`.
- public init(_ d: Double) {
- self = .double(d)
- }
- /// Initializes `self` as an object with the value `obj`.
- public init(_ obj: JSONObject) {
- self = .object(obj)
- }
- /// Initializes `self` as an array with the value `ary`.
- public init(_ ary: JSONArray) {
- self = .array(ary)
- }
-}
-
-// Convenience conversions.
-public extension JSON {
- /// Initializes `self` as a 64-bit integer with the value `i`.
- public init(_ i: Int) {
- self = .int64(Int64(i))
- }
-
- /// Initializes `self` as an array with the contents of the sequence `seq`.
- public init(_ seq: S) where S.Iterator.Element == JSON {
- self = .array(JSONArray(seq))
- }
-
- /// Initializes `self` as an array with the contents of the sequence `seq`.
- public init(_ seq: S) where S.Iterator.Element == JSONObject {
- self = .array(JSONArray(seq.lazy.map(JSON.init)))
- }
-
- /// Initializes `self` as an array with the contents of the sequence `seq`.
- public init(_ seq: S) where S.Iterator.Element == JSONArray {
- self = .array(JSONArray(seq.lazy.map(JSON.init)))
- }
-}
-
-public typealias JSONArray = ContiguousArray
-
-extension JSON: Equatable {
- public static func ==(lhs: JSON, rhs: JSON) -> Bool {
- switch (lhs, rhs) {
- case (.null, .null): return true
- case (.bool(let a), .bool(let b)): return a == b
- case (.string(let a), .string(let b)): return a == b
- case (.int64(let a), .int64(let b)): return a == b
- case (.double(let a), .double(let b)): return a == b
- case (.int64(let a), .double(let b)): return Double(a) == b
- case (.double(let a), .int64(let b)): return a == Double(b)
- case (.object(let a), .object(let b)): return a == b
- case (.array(let a), .array(let b)): return a == b
- default: return false
- }
- }
-}
-
-extension JSON: TextOutputStreamable, CustomStringConvertible, CustomDebugStringConvertible {
- public func write(to target: inout Target) {
- JSON.encode(self, toStream: &target, pretty: false)
- }
-
- public var description: String {
- return JSON.encodeAsString(self, pretty: false)
- }
-
- public var debugDescription: String {
- let desc = JSON.encodeAsString(self, pretty: false)
- return "JSON(\(desc))"
- }
-}
-
-extension JSON: ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral, ExpressibleByBooleanLiteral, ExpressibleByNilLiteral {
- public init(integerLiteral value: Int64) {
- self = .int64(value)
- }
-
- public init(floatLiteral value: Double) {
- self = .double(value)
- }
-
- public init(booleanLiteral value: Bool) {
- self = .bool(value)
- }
-
- public init(nilLiteral: ()) {
- self = .null
- }
-}
-
-extension JSON: ExpressibleByStringLiteral {
- public init(stringLiteral value: String) {
- self = .string(value)
- }
-
- public init(extendedGraphemeClusterLiteral value: String) {
- self = .string(value)
- }
-
- public init(unicodeScalarLiteral value: String) {
- self = .string(value)
- }
-}
-
-extension JSON: ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral {
- public init(arrayLiteral elements: JSON...) {
- self = .array(JSONArray(elements))
- }
-
- public init(dictionaryLiteral elements: (String, JSON)...) {
- self = .object(JSONObject(elements))
- }
-}
-
-extension JSON: CustomReflectable {
- public var customMirror: Mirror {
- switch self {
- case .null, .bool, .string, .int64, .double: return Mirror(self, children: [])
- case .object(let obj):
- let children: LazyMapCollection = obj.lazy.map({ ($0, $1) })
- return Mirror(self, children: children, displayStyle: .dictionary)
- case .array(let ary):
- return Mirror(self, unlabeledChildren: ary, displayStyle: .collection)
- }
- }
-}
diff --git a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSONError.swift b/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSONError.swift
deleted file mode 100755
index a55773e6f..000000000
--- a/tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/JSONError.swift
+++ /dev/null
@@ -1,1619 +0,0 @@
-//
-// JSONError.swift
-// PMJSON
-//
-// Created by Kevin Ballard on 11/9/15.
-// Copyright © 2016 Postmates.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-
-// MARK: JSONError
-
-/// Errors thrown by the JSON `get*` or `to*` accessor families.
-public enum JSONError: Error, CustomStringConvertible {
- /// Thrown when a given path is missing or has the wrong type.
- /// - Parameter path: The path of the key that caused the error.
- /// - Parameter expected: The type that was expected at this path.
- /// - Parameter actual: The type of the value found at the path, or `nil` if there was no value.
- case missingOrInvalidType(path: String?, expected: ExpectedType, actual: JSONType?)
- /// Thrown when an integral value is coerced to a smaller type (e.g. `Int64` to `Int`) and the
- /// value doesn't fit in the smaller type.
- /// - Parameter path: The path of the value that cuased the error.
- /// - Parameter value: The actual value at that path.
- /// - Parameter expected: The type that the value doesn't fit in, e.g. `Int.self`.
- case outOfRangeInt64(path: String?, value: Int64, expected: Any.Type)
- /// Thrown when a floating-point value is coerced to a smaller type (e.g. `Double` to `Int`)
- /// and the value doesn't fit in the smaller type.
- /// - Parameter path: The path of the value that cuased the error.
- /// - Parameter value: The actual value at that path.
- /// - Parameter expected: The type that the value doesn't fit in, e.g. `Int.self`.
- case outOfRangeDouble(path: String?, value: Double, expected: Any.Type)
-
- public var description: String {
- switch self {
- case let .missingOrInvalidType(path, expected, actual): return "\(path.map({"\($0): "}) ?? "")expected \(expected), found \(actual?.description ?? "missing value")"
- case let .outOfRangeInt64(path, value, expected): return "\(path.map({"\($0): "}) ?? "")value \(value) cannot be coerced to type \(expected)"
- case let .outOfRangeDouble(path, value, expected): return "\(path.map({"\($0): "}) ?? "")value \(value) cannot be coerced to type \(expected)"
- }
- }
-
- fileprivate func withPrefix(_ prefix: String) -> JSONError {
- func prefixPath(_ path: String?, with prefix: String) -> String {
- guard let path = path, !path.isEmpty else { return prefix }
- if path.unicodeScalars.first == "[" {
- return prefix + path
- } else {
- return "\(prefix).\(path)"
- }
- }
- switch self {
- case let .missingOrInvalidType(path, expected, actual):
- return .missingOrInvalidType(path: prefixPath(path, with: prefix), expected: expected, actual: actual)
- case let .outOfRangeInt64(path, value, expected):
- return .outOfRangeInt64(path: prefixPath(path, with: prefix), value: value, expected: expected)
- case let .outOfRangeDouble(path, value, expected):
- return .outOfRangeDouble(path: prefixPath(path, with: prefix), value: value, expected: expected)
- }
- }
-
- public enum ExpectedType: CustomStringConvertible {
- case required(JSONType)
- case optional(JSONType)
-
- public var description: String {
- switch self {
- case .required(let type): return type.description
- case .optional(let type): return "\(type) or null"
- }
- }
- }
-
- public enum JSONType: String, CustomStringConvertible {
- case null = "null"
- case bool = "bool"
- case string = "string"
- case number = "number"
- case object = "object"
- case array = "array"
-
- internal static func forValue(_ value: JSON) -> JSONType {
- switch value {
- case .null: return .null
- case .bool: return .bool
- case .string: return .string
- case .int64, .double: return .number
- case .object: return .object
- case .array: return .array
- }
- }
-
- public var description: String {
- return rawValue
- }
- }
-}
-
-// MARK: - Basic accessors
-public extension JSON {
- /// Returns the bool value if the receiver is a bool.
- /// - Returns: A `Bool` value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getBool() throws -> Bool {
- guard let b = self.bool else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.bool), actual: .forValue(self)) }
- return b
- }
-
- /// Returns the bool value if the receiver is a bool.
- /// - Returns: A `Bool` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getBoolOrNil() throws -> Bool? {
- if let b = self.bool { return b }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.bool), actual: .forValue(self)) }
- }
-
- /// Returns the string value if the receiver is a string.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getString() throws -> String {
- guard let str = self.string else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.string), actual: .forValue(self)) }
- return str
- }
-
- /// Returns the string value if the receiver is a string.
- /// - Returns: A `String` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getStringOrNil() throws -> String? {
- if let str = self.string { return str }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.string), actual: .forValue(self)) }
- }
-
- /// Returns the 64-bit integral value if the receiver is a number.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getInt64() throws -> Int64 {
- guard let val = self.int64 else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self)) }
- return val
- }
-
- /// Returns the 64-bit integral value value if the receiver is a number.
- /// - Returns: An `Int64` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getInt64OrNil() throws -> Int64? {
- if let val = self.int64 { return val }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.number), actual: .forValue(self)) }
- }
-
- /// Returns the integral value if the receiver is a number.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the receiver is the wrong type, or if the 64-bit integral value
- /// is too large to fit in an `Int`.
- func getInt() throws -> Int {
- guard let val = self.int64 else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self)) }
- let truncated = Int(truncatingBitPattern: val)
- guard Int64(truncated) == val else { throw JSONError.outOfRangeInt64(path: nil, value: val, expected: Int.self) }
- return truncated
- }
-
- /// Returns the integral value if the receiver is a number.
- /// - Returns: An `Int` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type, or if the 64-bit integral value
- /// is too large to fit in an `Int`.
- func getIntOrNil() throws -> Int? {
- if let val = self.int64 {
- let truncated = Int(truncatingBitPattern: val)
- guard Int64(truncated) == val else { throw JSONError.outOfRangeInt64(path: nil, value: val, expected: Int.self) }
- return truncated
- } else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.number), actual: .forValue(self)) }
- }
-
- /// Returns the double value if the receiver is a number.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getDouble() throws -> Double {
- guard let val = self.double else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .forValue(self)) }
- return val
- }
-
- /// Returns the double value if the receiver is a number.
- /// - Returns: A `Double` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getDoubleOrNil() throws -> Double? {
- if let val = self.double { return val }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.number), actual: .forValue(self)) }
- }
-
- /// Returns the object value if the receiver is an object.
- /// - Returns: An object value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getObject() throws -> JSONObject {
- guard let dict = self.object else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.object), actual: .forValue(self)) }
- return dict
- }
-
- /// Returns the object value if the receiver is an object.
- /// - Returns: An object value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getObjectOrNil() throws -> JSONObject? {
- if let dict = self.object { return dict }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.object), actual: .forValue(self)) }
- }
-
- /// Returns the array value if the receiver is an array.
- /// - Returns: An array value.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getArray() throws -> JSONArray {
- guard let ary = self.array else { throw JSONError.missingOrInvalidType(path: nil, expected: .required(.array), actual: .forValue(self)) }
- return ary
- }
-
- /// Returns the array value if the receiver is an array.
- /// - Returns: An array value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is the wrong type.
- func getArrayOrNil() throws -> JSONArray? {
- if let ary = self.array { return ary }
- else if isNull { return nil }
- else { throw JSONError.missingOrInvalidType(path: nil, expected: .optional(.array), actual: .forValue(self)) }
- }
-}
-
-public extension JSON {
- /// Returns the receiver coerced to a string value.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the receiver is an object or array.
- func toString() throws -> String {
- return try toStringMaybeNil(.required(.string)) ?? "null"
- }
-
- /// Returns the receiver coerced to a string value.
- /// - Returns: A `String` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is an object or array.
- func toStringOrNil() throws -> String? {
- return try toStringMaybeNil(.optional(.string))
- }
-
- private func toStringMaybeNil(_ expected: JSONError.ExpectedType) throws -> String? {
- switch self {
- case .string(let s): return s
- case .null: return nil
- case .bool(let b): return String(b)
- case .int64(let i): return String(i)
- case .double(let d): return String(d)
- default: throw JSONError.missingOrInvalidType(path: nil, expected: expected, actual: .forValue(self))
- }
- }
-
- /// Returns the receiver coerced to a 64-bit integral value.
- /// If the receiver is a floating-point value, the value will be truncated
- /// to an integer.
- /// - Returns: An `Int64` value`.
- /// - Throws: `JSONError` if the receiver is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to a 64-bit integral value,
- /// or a floating-point value that does not fit in 64 bits.
- func toInt64() throws -> Int64 {
- guard let val = try toInt64MaybeNil(.required(.number)) else {
- throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .null)
- }
- return val
- }
-
- /// Returns the receiver coerced to a 64-bit integral value.
- /// If the receiver is a floating-point value, the value will be truncated
- /// to an integer.
- /// - Returns: An `Int64` value`, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is a boolean, an object, an array,
- /// a string that cannot be coerced to a 64-bit integral value,
- /// or a floating-point value that does not fit in 64 bits.
- func toInt64OrNil() throws -> Int64? {
- return try toInt64MaybeNil(.optional(.number))
- }
-
- private func toInt64MaybeNil(_ expected: JSONError.ExpectedType) throws -> Int64? {
- switch self {
- case .int64(let i):
- return i
- case .double(let d):
- guard let val = convertDoubleToInt64(d) else {
- throw JSONError.outOfRangeDouble(path: nil, value: d, expected: Int64.self)
- }
- return val
- case .string(let s):
- if let i = Int64(s, radix: 10) {
- return i
- } else if let d = Double(s) {
- guard let val = convertDoubleToInt64(d) else {
- throw JSONError.outOfRangeDouble(path: nil, value: d, expected: Int64.self)
- }
- return val
- }
- case .null:
- return nil
- default:
- break
- }
- throw JSONError.missingOrInvalidType(path: nil, expected: expected, actual: .forValue(self))
- }
-
- /// Returns the receiver coerced to an integral value.
- /// If the receiver is a floating-point value, the value will be truncated
- /// to an integer.
- /// - Returns: An `Int` value`.
- /// - Throws: `JSONError` if the receiver is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to an integral value,
- /// or a floating-point value that does not fit in an `Int`.
- func toInt() throws -> Int {
- let val = try toInt64()
- let truncated = Int(truncatingBitPattern: val)
- guard Int64(truncated) == val else { throw JSONError.outOfRangeInt64(path: nil, value: val, expected: Int.self) }
- return truncated
- }
-
- /// Returns the receiver coerced to an integral value.
- /// If the receiver is a floating-point value, the value will be truncated
- /// to an integer.
- /// - Returns: An `Int` value`, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is a boolean, an object,
- /// an array, a string that cannot be coerced to an integral value,
- /// or a floating-point value that does not fit in an `Int`.
- func toIntOrNil() throws -> Int? {
- guard let val = try toInt64OrNil() else { return nil }
- let truncated = Int(truncatingBitPattern: val)
- guard Int64(truncated) == val else { throw JSONError.outOfRangeInt64(path: nil, value: val, expected: Int.self) }
- return truncated
- }
-
- /// Returns the receiver coerced to a `Double`.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the receiver is `null`, a boolean, an object, an array,
- /// or a string that cannot be coerced to a floating-point value.
- func toDouble() throws -> Double {
- guard let val = try toDoubleMaybeNil(.required(.number)) else {
- throw JSONError.missingOrInvalidType(path: nil, expected: .required(.number), actual: .null)
- }
- return val
- }
-
- /// Returns the receiver coerced to a `Double`.
- /// - Returns: A `Double` value, or `nil` if the receiver is `null`.
- /// - Throws: `JSONError` if the receiver is a boolean, an object, an array,
- /// or a string that cannot be coerced to a floating-point value.
- func toDoubleOrNil() throws -> Double? {
- return try toDoubleMaybeNil(.optional(.number))
- }
-
- private func toDoubleMaybeNil(_ expected: JSONError.ExpectedType) throws -> Double? {
- switch self {
- case .int64(let i): return Double(i)
- case .double(let d): return d
- case .string(let s): return Double(s)
- case .null: return nil
- default: throw JSONError.missingOrInvalidType(path: nil, expected: expected, actual: .forValue(self))
- }
- }
-}
-
-// MARK: - Keyed accessors
-public extension JSON {
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Bool` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getBool(_ key: String) throws -> Bool {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .string)
- return try scoped(key) { try value.getBool() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Bool` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object.
- func getBoolOrNil(_ key: String) throws -> Bool? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getBoolOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getString(_ key: String) throws -> String {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .string)
- return try scoped(key) { try value.getString() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object.
- func getStringOrNil(_ key: String) throws -> String? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getStringOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getInt64(_ key: String) throws -> Int64 {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.getInt64() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object.
- func getInt64OrNil(_ key: String) throws -> Int64? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getInt64OrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type,
- /// or if the 64-bit integral value is too large to fit in an `Int`, or if
- /// the receiver is not an object.
- func getInt(_ key: String) throws -> Int {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.getInt() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the 64-bit integral
- /// value is too large to fit in an `Int`, or if the receiver is not an object.
- func getIntOrNil(_ key: String) throws -> Int? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getIntOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- func getDouble(_ key: String) throws -> Double {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.getDouble() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object.
- func getDoubleOrNil(_ key: String) throws -> Double? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getDoubleOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getObject(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An object value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- /// - SeeAlso: `getObject(_:_:)`
- func getObject(_ key: String) throws -> JSONObject {
- return try getObject(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getObjectOrNil(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An object value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object.
- /// - SeeAlso: `getObjectOrNil(_:_:)`
- func getObjectOrNil(_ key: String) throws -> JSONObject? {
- return try getObjectOrNil(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object, or any error thrown by `transform`.
- func getObject(_ key: String, _ transform: (JSONObject) throws -> T) throws -> T {
- return try getObject().getObject(key, transform)
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object,
- /// or any error thrown by `transform`.
- func getObjectOrNil(_ key: String, _ transform: (JSONObject) throws -> T?) throws -> T? {
- return try getObject().getObjectOrNil(key, transform)
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getArray(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object.
- /// - SeeAlso: `getArray(_:_:)`
- func getArray(_ key: String) throws -> JSONArray {
- return try getArray(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getArrayOrNil(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An array value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- /// - SeeAlso: `getArrayOrNil(_:_:)`
- func getArrayOrNil(_ key: String) throws -> JSONArray? {
- return try getArrayOrNil(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or if
- /// the receiver is not an object, or any error thrown by `transform`.
- func getArray(_ key: String, _ transform: (JSONArray) throws -> T) throws -> T {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .array)
- return try scoped(key) { try transform(value.getArray()) }
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an object,
- /// or any error thrown by `transform`.
- func getArrayOrNil(_ key: String, _ transform: (JSONArray) throws -> T?) throws -> T? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.getArrayOrNil().flatMap(transform) }
- }
-}
-
-public extension JSON {
- /// Subscripts the receiver with `key` and returns the result coerced to a `String`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the key doesn't exist, the value is an object or an array,
- /// or if the receiver is not an object.
- /// - SeeAlso: `toString()`.
- func toString(_ key: String) throws -> String {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .string)
- return try scoped(key) { try value.toString() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `String`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is an object or an array, or if the receiver is not an object.
- /// - SeeAlso: `toStringOrNil()`.
- func toStringOrNil(_ key: String) throws -> String? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.toStringOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int64`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to a 64-bit integral value, or a floating-point
- /// value that does not fit in 64 bits, or if the receiver is not an object.
- func toInt64(_ key: String) throws -> Int64 {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.toInt64() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int64`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to a 64-bit integral value, or a floating-point value
- /// that does not fit in 64 bits, or if the receiver is not an object.
- func toInt64OrNil(_ key: String) throws -> Int64? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.toInt64OrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to an integral value, or a floating-point
- /// value that does not fit in an `Int`, or if the receiver is not an object.
- func toInt(_ key: String) throws -> Int {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.toInt() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to an integral value, or a floating-point value
- /// that does not fit in an `Int`, or if the receiver is not an object.
- func toIntOrNil(_ key: String) throws -> Int? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.toIntOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `Double`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean,
- /// an object, an array, or a string that cannot be coerced to a floating-point value,
- /// or if the receiver is not an object.
- func toDouble(_ key: String) throws -> Double {
- let dict = try getObject()
- let value = try getRequired(dict, key: key, type: .number)
- return try scoped(key) { try value.toDouble() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `Double`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a floating-point value, or if the receiver is not an object.
- func toDoubleOrNil(_ key: String) throws -> Double? {
- let dict = try getObject()
- guard let value = dict[key] else { return nil }
- return try scoped(key) { try value.toDoubleOrNil() }
- }
-}
-
-// MARK: - Indexed accessors
-public extension JSON {
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Bool` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- func getBool(_ index: Int) throws -> Bool {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .bool)
- return try scoped(index) { try value.getBool() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Bool` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- func getBoolOrNil(_ index: Int) throws -> Bool? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getBoolOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- func getString(_ index: Int) throws -> String {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .string)
- return try scoped(index) { try value.getString() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- func getStringOrNil(_ index: Int) throws -> String? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getStringOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- func getInt64(_ index: Int) throws -> Int64 {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.getInt64() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- func getInt64OrNil(_ index: Int) throws -> Int64? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getInt64OrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the 64-bit integral value is too large to fit in an `Int`, or if
- /// the receiver is not an array.
- func getInt(_ index: Int) throws -> Int {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.getInt() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the 64-bit integral value
- /// is too large to fit in an `Int`, or if the receiver is not an array.
- func getIntOrNil(_ index: Int) throws -> Int? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getIntOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- func getDouble(_ index: Int) throws -> Double {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.getDouble() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- func getDoubleOrNil(_ index: Int) throws -> Double? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getDoubleOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Note: Use `getObject(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An object value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- /// - SeeAlso: `getObject(_:_:)`
- func getObject(_ index: Int) throws -> JSONObject {
- return try getObject(index, { $0 })
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Note: Use `getObjectOrNil(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An object value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- /// - SeeAlso: `getObjectOrNil(_:_:)`
- func getObjectOrNil(_ index: Int) throws -> JSONObject? {
- return try getObjectOrNil(index, { $0 })
- }
-
- /// Subscripts the receiver with `index` and passes the result to the given block.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `index`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array, or any error thrown by `transform`.
- func getObject(_ index: Int, _ f: (JSONObject) throws -> T) throws -> T {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .object)
- return try scoped(index) { try f(value.getObject()) }
- }
-
- /// Subscripts the receiver with `index` and passes the result to the given block.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `index`.
- /// - Returns: The result of calling the given block, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array,
- //// or any error thrown by `transform`.
- func getObjectOrNil(_ index: Int, _ f: (JSONObject) throws -> T?) throws -> T? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getObjectOrNil().flatMap(f) }
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Note: Use `getArray(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An array value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array.
- /// - SeeAlso: `getArray(_:_:)`
- func getArray(_ index: Int) throws -> JSONArray {
- return try getArray(index, { $0 })
- }
-
- /// Subscripts the receiver with `index` and returns the result.
- /// - Note: Use `getArrayOrNil(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An array value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array.
- /// - SeeAlso: `getArrayOrNil(_:_:)`
- func getArrayOrNil(_ index: Int) throws -> JSONArray? {
- return try getArrayOrNil(index, { $0 })
- }
-
- /// Subscripts the receiver with `index` and passes the result to the given block.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `index`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the index is out of bounds or the value is the wrong type,
- /// or if the receiver is not an array, or any error thrown by `transform`.
- func getArray(_ index: Int, _ f: (JSONArray) throws -> T) throws -> T {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .array)
- return try scoped(index) { try f(value.getArray()) }
- }
-
- /// Subscripts the receiver with `index` and passes the result to the given block.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `index`.
- /// - Returns: The result of calling the given block, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the receiver is not an array,
- /// or any error thrown by `transform`.
- func getArrayOrNil(_ index: Int, _ f: (JSONArray) throws -> T?) throws -> T? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.getArrayOrNil().flatMap(f) }
- }
-}
-
-public extension JSON {
- /// Subscripts the receiver with `index` and returns the result coerced to a `String`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is an object or an array,
- /// or if the receiver is not an array.
- /// - SeeAlso: `toString()`.
- func toString(_ index: Int) throws -> String {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .string)
- return try scoped(index) { try value.toString() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to a `String`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value is an object or an array, or if the receiver is not an array.
- /// - SeeAlso: `toStringOrNil()`.
- func toStringOrNil(_ index: Int) throws -> String? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.toStringOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to an `Int64`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is `null`, a boolean,
- /// an object, an array, a string that cannot be coerced to a 64-bit integral value, or a
- /// floating-point value that does not fit in 64 bits, or if the receiver is not an array.
- /// - SeeAlso: `toInt64()`.
- func toInt64(_ index: Int) throws -> Int64 {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.toInt64() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to an `Int64`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to a 64-bit integral value, or a floating-point value
- /// that does not fit in 64 bits, or if the receiver is not an array.
- /// - SeeAlso: `toInt64OrNil()`.
- func toInt64OrNil(_ index: Int) throws -> Int64? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.toInt64OrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to an `Int`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is `null`, a boolean,
- /// an object, an array, a string that cannot be coerced to an integral value, or a
- /// floating-point value that does not fit in an `Int`, or if the receiver is not an array.
- /// - SeeAlso: `toInt()`.
- func toInt(_ index: Int) throws -> Int {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.toInt() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to an `Int`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to an integral value, or a floating-point value
- /// that does not fit in an `Int`, or if the receiver is not an array.
- /// - SeeAlso: `toIntOrNil()`.
- func toIntOrNil(_ index: Int) throws -> Int? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.toIntOrNil() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to a `Double`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the index is out of bounds or the value is `null`, a boolean,
- /// an object, an array, or a string that cannot be coerced to a floating-point value,
- /// or if the receiver is not an array.
- /// - SeeAlso: `toDouble()`.
- func toDouble(_ index: Int) throws -> Double {
- let ary = try getArray()
- let value = try getRequired(ary, index: index, type: .number)
- return try scoped(index) { try value.toDouble() }
- }
-
- /// Subscripts the receiver with `index` and returns the result coerced to a `Double`.
- /// - Parameter index: The index that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the index is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a floating-point value, or if the receiver is not an array.
- /// - SeeAlso: `toDouble()`.
- func toDoubleOrNil(_ index: Int) throws -> Double? {
- let ary = try getArray()
- guard let value = ary[safe: index] else { return nil }
- return try scoped(index) { try value.toDoubleOrNil() }
- }
-}
-
-// MARK: -
-
-public extension JSONObject {
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Bool` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- func getBool(_ key: String) throws -> Bool {
- let value = try getRequired(self, key: key, type: .string)
- return try scoped(key) { try value.getBool() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Bool` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- func getBoolOrNil(_ key: String) throws -> Bool? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getBoolOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- func getString(_ key: String) throws -> String {
- let value = try getRequired(self, key: key, type: .string)
- return try scoped(key) { try value.getString() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- func getStringOrNil(_ key: String) throws -> String? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getStringOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- func getInt64(_ key: String) throws -> Int64 {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.getInt64() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- func getInt64OrNil(_ key: String) throws -> Int64? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getInt64OrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type,
- /// or if the 64-bit integral value is too large to fit in an `Int`.
- func getInt(_ key: String) throws -> Int {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.getInt() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or if the 64-bit integral
- /// value is too large to fit in an `Int`.
- func getIntOrNil(_ key: String) throws -> Int? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getIntOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- func getDouble(_ key: String) throws -> Double {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.getDouble() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- func getDoubleOrNil(_ key: String) throws -> Double? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getDoubleOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getObject(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An object value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- /// - SeeAlso: `getObject(_:_:)`
- func getObject(_ key: String) throws -> JSONObject {
- return try getObject(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getObjectOrNil(_:_:)` when using throwing accessors on the resulting
- /// object value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An object value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- /// - SeeAlso: `getObjectOrNil(_:_:)`
- func getObjectOrNil(_ key: String) throws -> JSONObject? {
- return try getObjectOrNil(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or any
- /// error thrown by `transform`.
- func getObject(_ key: String, _ f: (JSONObject) throws -> T) throws -> T {
- let value = try getRequired(self, key: key, type: .object)
- return try scoped(key) { try f(value.getObject()) }
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or any error thrown by `transform`.
- func getObjectOrNil(_ key: String, _ f: (JSONObject) throws -> T?) throws -> T? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getObjectOrNil().flatMap(f) }
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getArray(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type.
- /// - SeeAlso: `getArray(_:_:)`
- func getArray(_ key: String) throws -> JSONArray {
- return try getArray(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and returns the result.
- /// - Note: Use `getArrayOrNil(_:_:)` when using throwing accessors on the resulting
- /// array value to produce better errors.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An array value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type.
- /// - SeeAlso: `getArrayOrNil(_:_:)`
- func getArrayOrNil(_ key: String) throws -> JSONArray? {
- return try getArrayOrNil(key, { $0 })
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block.
- /// - Throws: `JSONError` if the key doesn't exist or the value is the wrong type, or any
- /// error thrown by `transform`.
- func getArray(_ key: String, _ f: (JSONArray) throws -> T) throws -> T {
- let value = try getRequired(self, key: key, type: .array)
- return try scoped(key) { try f(value.getArray()) }
- }
-
- /// Subscripts the receiver with `key` and passes the result to the given block.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Parameter transform: A block that's called with the result of subscripting the receiver with `key`.
- /// - Returns: The result of calling the given block, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value has the wrong type, or any error thrown by `transform`.
- func getArrayOrNil(_ key: String, _ f: (JSONArray) throws -> T?) throws -> T? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.getArrayOrNil().flatMap(f) }
- }
-}
-
-public extension JSONObject {
- /// Subscripts the receiver with `key` and returns the result coerced to a `String`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value.
- /// - Throws: `JSONError` if the key doesn't exist, the value is an object or an array,
- /// or if the receiver is not an object.
- /// - SeeAlso: `toString()`.
- func toString(_ key: String) throws -> String {
- let value = try getRequired(self, key: key, type: .string)
- return try scoped(key) { try value.toString() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `String`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `String` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is an object or an array, or if the receiver is not an object.
- /// - SeeAlso: `toStringOrNil()`.
- func toStringOrNil(_ key: String) throws -> String? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.toStringOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int64`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to a 64-bit integral value, or a floating-point
- /// value that does not fit in 64 bits, or if the receiver is not an object.
- func toInt64(_ key: String) throws -> Int64 {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.toInt64() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int64`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int64` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to a 64-bit integral value, or a floating-point value
- /// that does not fit in 64 bits, or if the receiver is not an object.
- func toInt64OrNil(_ key: String) throws -> Int64? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.toInt64OrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean, an object,
- /// an array, a string that cannot be coerced to an integral value, or a floating-point
- /// value that does not fit in an `Int`, or if the receiver is not an object.
- func toInt(_ key: String) throws -> Int {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.toInt() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to an `Int`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: An `Int` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the the value is a boolean, an object, an array, a string
- /// that cannot be coerced to an integral value, or a floating-point value
- /// that does not fit in an `Int`, or if the receiver is not an object.
- func toIntOrNil(_ key: String) throws -> Int? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.toIntOrNil() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `Double`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value.
- /// - Throws: `JSONError` if the key doesn't exist or the value is `null`, a boolean,
- /// an object, an array, or a string that cannot be coerced to a floating-point value,
- /// or if the receiver is not an object.
- func toDouble(_ key: String) throws -> Double {
- let value = try getRequired(self, key: key, type: .number)
- return try scoped(key) { try value.toDouble() }
- }
-
- /// Subscripts the receiver with `key` and returns the result coerced to a `Double`.
- /// - Parameter key: The key that's used to subscript the receiver.
- /// - Returns: A `Double` value, or `nil` if the key doesn't exist or the value is `null`.
- /// - Throws: `JSONError` if the value is a boolean, an object, an array, or a string that
- /// cannot be coerced to a floating-point value, or if the receiver is not an object.
- func toDoubleOrNil(_ key: String) throws -> Double? {
- guard let value = self[key] else { return nil }
- return try scoped(key) { try value.toDoubleOrNil() }
- }
-}
-
-// MARK: - JSONArray helpers
-
-public extension JSON {
- /// Returns an `Array` containing the results of mapping `transform` over `array`.
- ///
- /// If `transform` throws a `JSONError`, the error will be modified to include the index
- /// of the element that caused the error.
- ///
- /// - Parameter array: The `JSONArray` to map over.
- /// - Parameter transform: A block that is called once for each element of `array`.
- /// - Returns: An array with the results of mapping `transform` over `array`.
- /// - Throws: Rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- static func map(_ array: JSONArray, _ transform: (JSON) throws -> T) rethrows -> [T] {
- return try array.enumerated().map({ i, elt in try scoped(i, { try transform(elt) }) })
- }
-
- /// Returns an `Array` containing the non-`nil` results of mapping `transform` over `array`.
- ///
- /// If `transform` throws a `JSONError`, the error will be modified to include the index
- /// of the element that caused the error.
- ///
- /// - Parameter array: The `JSONArray` to map over.
- /// - Parameter transform: A block that is called once for each element of `array`.
- /// - Returns: An array with the non-`nil` results of mapping `transform` over `array`.
- /// - Throws: Rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- static func flatMap(_ array: JSONArray, _ transform: (JSON) throws -> T?) rethrows -> [T] {
- return try array.enumerated().flatMap({ i, elt in try scoped(i, { try transform(elt) }) })
- }
-
- /// Returns an `Array` containing the concatenated results of mapping `transform` over `array`.
- ///
- /// If `transform` throws a `JSONError`, the error will be modified to include the index
- /// of the element that caused the error.
- ///
- /// - Parameter array: The `JSONArray` to map over.
- /// - Parameter transform: A block that is called once for each element of `array`.
- /// - Returns: An array with the concatenated results of mapping `transform` over `array`.
- /// - Throws: Rethrows any error thrown by `transform`.
- /// - Complexity: O(*M* + *N*) where *M* is the length of `array` and *N* is the length of the result.
- static func flatMap(_ array: JSONArray, _ transform: (JSON) throws -> S) rethrows -> [S.Iterator.Element] {
- return try array.enumerated().flatMap({ (i, elt) in
- return try scoped(i, { try transform(elt) })
- })
- }
-}
-
-public extension JSON {
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(key, { try JSON.map($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an object, `key` does not exist, or the value
- /// is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func mapArray(_ key: String, _ transform: (JSON) throws -> T) throws -> [T] {
- return try getArray(key, { try JSON.map($0, transform) })
- }
-
- /// Subscripts the receiver with `index`, converts the value to an array, and returns an `Array`
- /// containing the results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(index, { try JSON.map($0, transform) })`.
- ///
- /// - Parameter index: The index to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an array, `index` is out of bounds, or the
- /// value is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func mapArray(_ index: Int, _ transform: (JSON) throws -> T) throws -> [T] {
- return try getArray(index, { try JSON.map($0, transform) })
- }
-
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the results of mapping `transform` over the value.
- ///
- /// Returns `nil` if `key` doesn't exist or the value is `null`.
- ///
- /// - Note: This method is equivalent to `getArrayOrNil(key, { try JSON.map($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the results of mapping `transform` over the array, or `nil` if
- /// `key` does not exist or the value is `null`.
- /// - Throws: `JSONError` if the receiver is not an object or `key` exists but the value is not
- /// an array or `null`. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func mapArrayOrNil(_ key: String, _ transform: (JSON) throws -> T) throws -> [T]? {
- return try getArrayOrNil(key, { try JSON.map($0, transform) })
- }
-
- /// Subscripts the receiver with `index`, converts the value to an array, and returns an `Array`
- /// containing the results of mapping `transform` over the value.
- ///
- /// Returns `nil` if `index` is out of bounds or the value is `null`.
- ///
- /// - Note: This method is equivalent to `getArrayOrNil(index, { try JSON.map($0, transform) })`.
- ///
- /// - Parameter index: The index to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the results of mapping `transform` over the array, or `nil` if
- /// `index` is out of bounds or the value is `null`.
- /// - Throws: `JSONError` if the receiver is not an object or the subscript value is not an
- /// array or `null`. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func mapArrayOrNil(_ index: Int, _ transform: (JSON) throws -> T) throws -> [T]? {
- return try getArrayOrNil(index, { try JSON.map($0, transform) })
- }
-
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the non-`nil` results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(key, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the non-`nil` results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an object, `key` does not exist, or the value
- /// is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func flatMapArray(_ key: String, _ transform: (JSON) throws -> T?) throws -> [T] {
- return try getArray(key, { try JSON.flatMap($0, transform) })
- }
-
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the concatenated results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(key, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the concatenated results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an object, `key` does not exist, or the value
- /// is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*M* + *N*) where *M* is the length of `array` and *N* is the length of the result.
- func flatMapArray(_ key: String, _ transform: (JSON) throws -> S) throws -> [S.Iterator.Element] {
- return try getArray(key, { try JSON.flatMap($0, transform) })
- }
-
- /// Subscripts the receiver with `index`, converts the value to an array, and returns an `Array`
- /// containing the non-`nil` results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(index, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter index: The index to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the non-`nil` results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an array, `index` is out of bounds, or the
- /// value is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func flatMapArray(_ index: Int, _ transform: (JSON) throws -> T?) throws -> [T] {
- return try getArray(index, { try JSON.flatMap($0, transform) })
- }
-
- /// Subscripts the receiver with `index`, converts the value to an array, and returns an `Array`
- /// containing the concatenated results of mapping `transform` over the value.
- ///
- /// - Note: This method is equivalent to `getArray(index, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter index: The index to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the concatenated results of mapping `transform` over the array.
- /// - Throws: `JSONError` if the receiver is not an array, `index` is out of bounds, or the
- /// value is not an array. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*M* + *N*) where *M* is the length of `array` and *N* is the length of the result.
- func flatMapArray(_ index: Int, _ transform: (JSON) throws -> S) throws -> [S.Iterator.Element] {
- return try getArray(index, { try JSON.flatMap($0, transform) })
- }
-
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the non-`nil` results of mapping `transform` over the value.
- ///
- /// Returns `nil` if `key` doesn't exist or the value is `null`.
- ///
- /// - Note: This method is equivalent to `getArrayOrNil(key, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the non-`nil` results of mapping `transform` over the array, or
- /// `nil` if `key` does not exist or the value is `null`.
- /// - Throws: `JSONError` if the receiver is not an object or the value is not an array or
- /// `null`. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*N*).
- func flatMapArrayOrNil(_ key: String, _ transform: (JSON) throws -> T?) throws -> [T]? {
- return try getArrayOrNil(key, { try JSON.flatMap($0, transform) })
- }
-
- /// Subscripts the receiver with `key`, converts the value to an array, and returns an `Array`
- /// containing the concatenated results of mapping `transform` over the value.
- ///
- /// Returns `nil` if `key` doesn't exist or the value is `null`.
- ///
- /// - Note: This method is equivalent to `getArrayOrNil(key, { try JSON.flatMap($0, transform) })`.
- ///
- /// - Parameter key: The key to subscript the receiver with.
- /// - Parameter transform: A block that is called once for each element of the resulting array.
- /// - Returns: An array with the concatenated results of mapping `transform` over the array,
- /// or `nil` if `key` does not exist or the value is `null`.
- /// - Throws: `JSONError` if the receiver is not an object or the value is not an array or
- /// `null`. Also rethrows any error thrown by `transform`.
- /// - Complexity: O(*M* + *N*) where *M* is the length of `array` and *N* is the length of the result.
- func flatMapArrayOrNil