From ae625d0de74c2966e627e3d5e498ab72529c4251 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 4 Jun 2014 18:01:47 -0500 Subject: Revert "Add -I / --online-input for huge top-level arrays" This reverts commit 77936a594d797c480f26bfcef3636a74588a6918. There are too many odd bugs in this mode, and it turns out to be a bad idea anyways. Instead, in the future a better option will be to pursue alternative parsers, such as: - streaming parser that outputs only when a new leaf value is added or an array/object is opened/closed; options here include whether to include a path in each output; - parsers for binary JSON encodings (there's a variety of them). Then one might run jq with a streaming parser and use `reduce` to coalesce inputs from some depth down (instead of from one level down as the reverted commit had intended). Besides, a fully streaming parser is desirable in some cases, therefore we should have such a thing as an option. I've explored modifying the current parser to support a streaming option, but it only makes the code very difficult to follow, which is one reason that alternate parsers makes sense. At any rate, this is all for the future. For now there's no streaming of individual texts, just text sequences. --- jv.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'jv.h') diff --git a/jv.h b/jv.h index f58690a7..33a69826 100644 --- a/jv.h +++ b/jv.h @@ -139,11 +139,8 @@ void jv_nomem_handler(jv_nomem_handler_f, void *); jv jv_load_file(const char *, int); -typedef enum { - JV_PARSE_EXPLODE_TOPLEVEL_ARRAY = 1 -} jv_parser_flags; struct jv_parser; -struct jv_parser* jv_parser_new(jv_parser_flags); +struct jv_parser* jv_parser_new(); void jv_parser_set_buf(struct jv_parser*, const char*, int, int); jv jv_parser_next(struct jv_parser*); void jv_parser_free(struct jv_parser*); -- cgit v1.2.3