mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	Add jv_dumpf() and jv_show()
jv_dumpf() takes a FILE *. jv_show() is intended for use in debuggers, so it dumps the jv to stderr and it does not jv_free() the jv, so it's safe to "call jv_show(some_jv, -1)" in a debugger. If flags == -1 then the jv will be shown pretty-printed and in color.
This commit is contained in:
		
							
								
								
									
										3
									
								
								jv.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								jv.h
									
									
									
									
									
								
							@@ -3,6 +3,7 @@
 | 
			
		||||
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
  JV_KIND_INVALID,
 | 
			
		||||
@@ -124,7 +125,9 @@ jv jv_object_iter_value(jv, int);
 | 
			
		||||
int jv_get_refcnt(jv);
 | 
			
		||||
 | 
			
		||||
enum { JV_PRINT_PRETTY = 1, JV_PRINT_ASCII = 2, JV_PRINT_COLOUR = 4, JV_PRINT_SORTED = 8, JV_PRINT_UNBUFFERED = 16 };
 | 
			
		||||
void jv_dumpf(jv, FILE *f, int flags);
 | 
			
		||||
void jv_dump(jv, int flags);
 | 
			
		||||
void jv_show(jv, int flags);
 | 
			
		||||
jv jv_dump_string(jv, int flags);
 | 
			
		||||
 | 
			
		||||
jv jv_parse(const char* string);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user