File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed 
Sources/PureSwiftJSONParsing Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,11 @@ public struct DocumentReader {
219219    case  48 ... 57 : 
220220      return  ascii -  48 
221221    case  65 ... 70 : 
222+       // uppercase letters
222223      return  ascii -  55 
224+     case  97 ... 102 : 
225+       // lowercase letters
226+       return  ascii -  87 
223227    default : 
224228      return  nil 
225229    } 
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ class StringParserTests: XCTestCase {
2828    XCTAssertNoThrow ( result =  try JSONParser ( ) . parse ( bytes:  [ UInt8] ( #""\u005A""# . utf8) ) ) 
2929    XCTAssertEqual ( result,  . string( " Z " ) ) 
3030  } 
31+     
32+   func  testSimpleLowercaseEscapedUnicode( )  { 
33+     var  result :  JSONValue ? 
34+     XCTAssertNoThrow ( result =  try JSONParser ( ) . parse ( bytes:  [ UInt8] ( #""\u003c""# . utf8) ) ) 
35+     XCTAssertEqual ( result,  . string( " < " ) ) 
36+   } 
3137
3238  func  test12CharacterSequenceUnicode( )  { 
3339    // from: https://en.wikipedia.org/wiki/UTF-16#Examples
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments