We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ada713c + fe81859 commit 126b1d4Copy full SHA for 126b1d4
src/de.rs
@@ -62,6 +62,11 @@ pub fn from_slice(buf: &[u8]) -> Result<Value<'_>, Error> {
62
}
63
64
65
+pub fn parse_jsonb(buf: &[u8]) -> Result<Value<'_>, Error> {
66
+ let mut decoder = Decoder::new(buf);
67
+ decoder.decode()
68
+}
69
+
70
#[repr(transparent)]
71
pub struct Decoder<'a> {
72
buf: &'a [u8],
src/lib.rs
@@ -80,7 +80,7 @@ mod ser;
80
mod util;
81
mod value;
82
83
-pub use de::from_slice;
+pub use de::{from_slice, parse_jsonb};
84
pub use error::Error;
85
#[allow(unused_imports)]
86
pub use from::*;
0 commit comments