From 4f662fda3b7e4f97dbe6dc8831de471c37a1e391 Mon Sep 17 00:00:00 2001 From: Andreas Grosam Date: Mon, 3 Sep 2012 18:13:29 +0200 Subject: [PATCH 1/3] Initial commit --- .../JPJson iOS Libraries.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/JPJsonLib.xcscheme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/project.pbxproj b/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/project.pbxproj index 2022410..29b0fc4 100644 --- a/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/project.pbxproj +++ b/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/project.pbxproj @@ -209,7 +209,7 @@ A16AEB271441FB0300FDB7B2 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0440; }; buildConfigurationList = A16AEB2A1441FB0300FDB7B2 /* Build configuration list for PBXProject "JPJson iOS Libraries" */; compatibilityVersion = "Xcode 3.2"; diff --git a/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/xcshareddata/xcschemes/JPJsonLib.xcscheme b/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/xcshareddata/xcschemes/JPJsonLib.xcscheme index 3c7f437..dc85c39 100644 --- a/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/xcshareddata/xcschemes/JPJsonLib.xcscheme +++ b/Libraries/iOS Libraries/JPJson iOS Libraries.xcodeproj/xcshareddata/xcschemes/JPJsonLib.xcscheme @@ -1,6 +1,6 @@ Date: Mon, 17 Sep 2012 14:34:29 +0200 Subject: [PATCH 2/3] improved comment --- Source/json/ObjC/JPSemanticActionsProtocol.h | 34 ++++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Source/json/ObjC/JPSemanticActionsProtocol.h b/Source/json/ObjC/JPSemanticActionsProtocol.h index 5aa0fa9..54cdc85 100644 --- a/Source/json/ObjC/JPSemanticActionsProtocol.h +++ b/Source/json/ObjC/JPSemanticActionsProtocol.h @@ -58,22 +58,36 @@ JSON Strings (which inlcude keys) will be unescaped by the parser. - A typical flow of messages could be as follows: + Below is a typical flow of the complete messages: parserFoundArrayBegin parserFoundObjectBegin - parserFoundKeyValuePairBeginWithKey + parserFoundKeyValuePairBeginWithKey:length:encoding:index: parserFoundJsonArrayBegin - parserFoundJsonString - parserFoundJsonString - .. + parserFoundValueBeginAtIndex: + parserFoundJsonString:length:hasMore:encoding: + parserFoundJsonString:length:hasMore:encoding: + parserFoundJsonString:length:hasMore:encoding: + parserFoundValueEndAtIndex: + + parserFoundValueBeginAtIndex: + parserFoundJsonString:length:hasMore:encoding: + parserFoundValueEndAtIndex: + + ... + parserFoundJsonArrayEnd parserFoundKeyValuePairEnd - parserFoundKeyValuePairBeginWithKey + parserFoundKeyValuePairBeginWithKey:length:encoding:index: parserFoundJsonArrayBegin - parserFoundJsonString - parserFoundJsonString + parserFoundValueBeginAtIndex: + parserFoundNumber:length: + parserFoundValueEndAtIndex: + + parserFoundValueBeginAtIndex: + parserFoundNumber:length: + parserFoundValueEndAtIndex: .. parserFoundJsonArrayEnd parserFoundKeyValuePairEnd @@ -341,8 +355,8 @@ Sent to the delegate when the parser found the end of a JSON Value belonging to an JSON Array at the specified index. - The associated value at this index has been notified by the parser by the corres- - ponding event which has been sent immediately before this message. + The associated value at this index has been notified by the parser by the + corresponding event which has been sent immediately before this message. @param index The index of at which the value is added to the JSON Array. */ From b22db0314d14fa175c2a4561da8301922a03cf9b Mon Sep 17 00:00:00 2001 From: Andreas Grosam Date: Mon, 17 Sep 2012 14:54:21 +0200 Subject: [PATCH 3/3] fixed a comment and documentation --- Source/json/ObjC/JPSemanticActionsProtocol.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/json/ObjC/JPSemanticActionsProtocol.h b/Source/json/ObjC/JPSemanticActionsProtocol.h index 54cdc85..fc0802a 100644 --- a/Source/json/ObjC/JPSemanticActionsProtocol.h +++ b/Source/json/ObjC/JPSemanticActionsProtocol.h @@ -65,13 +65,13 @@ parserFoundKeyValuePairBeginWithKey:length:encoding:index: parserFoundJsonArrayBegin parserFoundValueBeginAtIndex: - parserFoundJsonString:length:hasMore:encoding: - parserFoundJsonString:length:hasMore:encoding: - parserFoundJsonString:length:hasMore:encoding: + parserFoundString:length:hasMore:encoding: + parserFoundString:length:hasMore:encoding: + parserFoundString:length:hasMore:encoding: parserFoundValueEndAtIndex: parserFoundValueBeginAtIndex: - parserFoundJsonString:length:hasMore:encoding: + parserFoundString:length:hasMore:encoding: parserFoundValueEndAtIndex: ... @@ -159,10 +159,10 @@ The four methods - - `-parserFoundJsonValueBeginAtIndex:`, - - `-parserFoundJsonValueEndAtIndex:`, - - `-parserFoundJsonValueBeginWithKey:length:encoding:index` and - - `-parserFoundJsonValueEndWithKey:length:encoding:index` + - `-parserFoundValueBeginAtIndex:`, + - `-parserFoundValueEndAtIndex:`, + - `-parserFoundValueBeginWithKey:length:encoding:index` and + - `-parserFoundValueEndWithKey:length:encoding:index` are helpful when implementing a streaming API. These additional messages give fine grained control for all relevant parser events.