yaji 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.markdown +4 -0
- data/ext/yaji/yajl_alloc.h +1 -0
- data/ext/yaji/yajl_buf.h +7 -0
- data/ext/yaji/yajl_encode.h +3 -0
- data/ext/yaji/yajl_lex.h +9 -0
- data/ext/yaji/yajl_parser.h +2 -0
- data/lib/yaji/version.rb +1 -1
- metadata +11 -11
data/HISTORY.markdown
CHANGED
data/ext/yaji/yajl_alloc.h
CHANGED
data/ext/yaji/yajl_buf.h
CHANGED
@@ -50,24 +50,31 @@
|
|
50
50
|
typedef struct yajl_buf_t * yajl_buf;
|
51
51
|
|
52
52
|
/* allocate a new buffer */
|
53
|
+
YAJL_API
|
53
54
|
yajl_buf yajl_buf_alloc(yajl_alloc_funcs * alloc);
|
54
55
|
|
55
56
|
/* free the buffer */
|
57
|
+
YAJL_API
|
56
58
|
void yajl_buf_free(yajl_buf buf);
|
57
59
|
|
58
60
|
/* append a number of bytes to the buffer */
|
61
|
+
YAJL_API
|
59
62
|
void yajl_buf_append(yajl_buf buf, const void * data, unsigned int len);
|
60
63
|
|
61
64
|
/* empty the buffer */
|
65
|
+
YAJL_API
|
62
66
|
void yajl_buf_clear(yajl_buf buf);
|
63
67
|
|
64
68
|
/* get a pointer to the beginning of the buffer */
|
69
|
+
YAJL_API
|
65
70
|
const unsigned char * yajl_buf_data(yajl_buf buf);
|
66
71
|
|
67
72
|
/* get the length of the buffer */
|
73
|
+
YAJL_API
|
68
74
|
unsigned int yajl_buf_len(yajl_buf buf);
|
69
75
|
|
70
76
|
/* truncate the buffer */
|
77
|
+
YAJL_API
|
71
78
|
void yajl_buf_truncate(yajl_buf buf, unsigned int len);
|
72
79
|
|
73
80
|
#endif
|
data/ext/yaji/yajl_encode.h
CHANGED
@@ -36,14 +36,17 @@
|
|
36
36
|
#include "yajl_buf.h"
|
37
37
|
#include "api/yajl_gen.h"
|
38
38
|
|
39
|
+
YAJL_API
|
39
40
|
void yajl_string_encode2(const yajl_print_t printer,
|
40
41
|
void * ctx,
|
41
42
|
const unsigned char * str,
|
42
43
|
unsigned int length);
|
43
44
|
|
45
|
+
YAJL_API
|
44
46
|
void yajl_string_encode(yajl_buf buf, const unsigned char * str,
|
45
47
|
unsigned int length);
|
46
48
|
|
49
|
+
YAJL_API
|
47
50
|
void yajl_string_decode(yajl_buf buf, const unsigned char * str,
|
48
51
|
unsigned int length);
|
49
52
|
|
data/ext/yaji/yajl_lex.h
CHANGED
@@ -63,10 +63,12 @@ typedef enum {
|
|
63
63
|
|
64
64
|
typedef struct yajl_lexer_t * yajl_lexer;
|
65
65
|
|
66
|
+
YAJL_API
|
66
67
|
yajl_lexer yajl_lex_alloc(yajl_alloc_funcs * alloc,
|
67
68
|
unsigned int allowComments,
|
68
69
|
unsigned int validateUTF8);
|
69
70
|
|
71
|
+
YAJL_API
|
70
72
|
void yajl_lex_free(yajl_lexer lexer);
|
71
73
|
|
72
74
|
/**
|
@@ -91,11 +93,13 @@ n * error messages.
|
|
91
93
|
* implications which require that the client choose a reasonable chunk
|
92
94
|
* size to get adequate performance.
|
93
95
|
*/
|
96
|
+
YAJL_API
|
94
97
|
yajl_tok yajl_lex_lex(yajl_lexer lexer, const unsigned char * jsonText,
|
95
98
|
unsigned int jsonTextLen, unsigned int * offset,
|
96
99
|
const unsigned char ** outBuf, unsigned int * outLen);
|
97
100
|
|
98
101
|
/** have a peek at the next token, but don't move the lexer forward */
|
102
|
+
YAJL_API
|
99
103
|
yajl_tok yajl_lex_peek(yajl_lexer lexer, const unsigned char * jsonText,
|
100
104
|
unsigned int jsonTextLen, unsigned int offset);
|
101
105
|
|
@@ -114,20 +118,25 @@ typedef enum {
|
|
114
118
|
yajl_lex_unallowed_comment
|
115
119
|
} yajl_lex_error;
|
116
120
|
|
121
|
+
YAJL_API
|
117
122
|
const char * yajl_lex_error_to_string(yajl_lex_error error);
|
118
123
|
|
119
124
|
/** allows access to more specific information about the lexical
|
120
125
|
* error when yajl_lex_lex returns yajl_tok_error. */
|
126
|
+
YAJL_API
|
121
127
|
yajl_lex_error yajl_lex_get_error(yajl_lexer lexer);
|
122
128
|
|
123
129
|
/** get the current offset into the most recently lexed json string. */
|
130
|
+
YAJL_API
|
124
131
|
unsigned int yajl_lex_current_offset(yajl_lexer lexer);
|
125
132
|
|
126
133
|
/** get the number of lines lexed by this lexer instance */
|
134
|
+
YAJL_API
|
127
135
|
unsigned int yajl_lex_current_line(yajl_lexer lexer);
|
128
136
|
|
129
137
|
/** get the number of chars lexed by this lexer instance since the last
|
130
138
|
* \n or \r */
|
139
|
+
YAJL_API
|
131
140
|
unsigned int yajl_lex_current_char(yajl_lexer lexer);
|
132
141
|
|
133
142
|
#endif
|
data/ext/yaji/yajl_parser.h
CHANGED
@@ -70,10 +70,12 @@ struct yajl_handle_t {
|
|
70
70
|
yajl_alloc_funcs alloc;
|
71
71
|
};
|
72
72
|
|
73
|
+
YAJL_API
|
73
74
|
yajl_status
|
74
75
|
yajl_do_parse(yajl_handle handle, const unsigned char * jsonText,
|
75
76
|
unsigned int jsonTextLen);
|
76
77
|
|
78
|
+
YAJL_API
|
77
79
|
unsigned char *
|
78
80
|
yajl_render_error_string(yajl_handle hand, const unsigned char * jsonText,
|
79
81
|
unsigned int jsonTextLen, int verbose);
|
data/lib/yaji/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-13 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &12907280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.8.7
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *12907280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake-compiler
|
27
|
-
requirement: &
|
27
|
+
requirement: &12906880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *12906880
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: minitest
|
38
|
-
requirement: &
|
38
|
+
requirement: &12906420 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *12906420
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: curb
|
49
|
-
requirement: &
|
49
|
+
requirement: &12906000 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *12906000
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: ruby-debug19
|
60
|
-
requirement: &
|
60
|
+
requirement: &12905540 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *12905540
|
69
69
|
description: YAJI is a ruby wrapper to YAJL providing iterator interface to streaming
|
70
70
|
JSON parser
|
71
71
|
email: info@couchbase.com
|