File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -226,10 +226,10 @@ class root_schema
226226			//  for each token create an object, if not already existing
227227			auto  unk_kw = &file.unknown_keywords ;
228228			for  (auto  &rt : ref_tokens) {
229- 				auto  existing_object = unk_kw-> find (rt) ;
230- 				if  (existing_object ==  unk_kw->end () )
229+ 				json::json_pointer rt_ptr{ " / "  + rt} ;
230+ 				if  (unk_kw->contains (rt_ptr) ==  false )
231231					(*unk_kw)[rt] = json::object ();
232- 				unk_kw = &(*unk_kw)[rt ];
232+ 				unk_kw = &(*unk_kw)[rt_ptr ];
233233			}
234234			(*unk_kw)[key] = value;
235235		}
Original file line number Diff line number Diff line change 1+ add_test_simple_schema(Issue::311
2+                        ${CMAKE_CURRENT_SOURCE_DIR} /schema.json
3+                        ${CMAKE_CURRENT_SOURCE_DIR} /instance.json)
Original file line number Diff line number Diff line change 1+ {
2+   "element" : [1 ]
3+ }
Original file line number Diff line number Diff line change 1+ {
2+   "type" : " object" 
3+   "properties" : {
4+     "element" : {
5+       "$ref" : " #/$defs/element" 
6+     }
7+   },
8+   "$defs" : {
9+     "element" : {
10+       "type" : " array" 
11+       "items" : [
12+         {
13+           "$comment" : " the comment should not lead to fail of loading schema" 
14+           "type" : " number" 
15+         }
16+       ]
17+     }
18+   }
19+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments