| 
									
										
										
										
											2011-11-02 14:23:41 -04:00
										 |  |  | USING: kernel vocabs ;
 | 
					
						
							| 
									
										
										
										
											2008-11-15 04:07:55 -05:00
										 |  |  | IN: json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SINGLETON: json-null | 
					
						
							| 
									
										
										
										
											2008-11-15 04:09:57 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-05 17:09:43 -05:00
										 |  |  | : if-json-null ( x if-null else -- )
 | 
					
						
							|  |  |  |     [ dup json-null? ] | 
					
						
							|  |  |  |     [ [ drop ] prepose ] | 
					
						
							|  |  |  |     [ ] tri* if ; inline
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : when-json-null ( x if-null -- ) [ ] if-json-null ; inline
 | 
					
						
							|  |  |  | : unless-json-null ( x else -- ) [ ] swap if-json-null ; inline
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-15 04:09:57 -05:00
										 |  |  | "json.reader" require | 
					
						
							|  |  |  | "json.writer" require |