Skip to content

Commit

Permalink
Merge pull request #4 from streamdal/blinktag/qol_improvements
Browse files Browse the repository at this point in the history
Adding Debug and Clone traits
  • Loading branch information
blinktag authored Feb 20, 2024
2 parents 158307d + 37f3c79 commit f66cf9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@

### \<WARNING>

> This is a fork of the official [gjson.rs](https://github.com/tidwall/gjson.rs) library used by [streamdal/wasm](https://github.com/streamdal/wasm) components. This version of the lib allows you to set JSON values (in a non-optimized way).
> This is a fork of the official [gjson.rs](https://github.com/tidwall/gjson.rs) library used by [streamdal/wasm](https://github.com/streamdal/streamdal) components. This version of the lib allows you to set JSON values (in a non-optimized way).
The only new func added is `set_overwrite()` - good luck!
The new functions added are:
* `set_overwrite()`
* `delete_path()`

Additionally, the following traits were added:

* `struct Value`: `Debug` and `Clone`
* `enum Kind`: `Debug`

NOTE: Due to infrequent releases for this fork, this repo does not have automated releases - you will need to perform the release process manually:

1. Make changes to code
2. Run tests
3. Figure out new version - you should _try_ to stay under the same version as upstream and only add a label
3. Figure out new version - you should _try_ to stay under the same version as upstream and only add a label. **But you cannot publish multiple tags for the same version**
4. Update `Cargo.toml` version with new version
5. `git commit -a`
6. `git tag 0.8.1-my-new-label`
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub use valid::valid;
type InfoBits = u32;

/// The kind of json `Value`.
#[derive(Copy, Clone, Eq)]
#[derive(Copy, Clone, Eq, Debug)]
pub enum Kind {
Null,
False,
Expand Down Expand Up @@ -79,6 +79,7 @@ static KINDMAP: [Kind; 256] = {
};

/// Value is the JSON value returned from the `get` function.
#[derive(Debug, Clone)]
pub struct Value<'a> {
slice: &'a str,
owned: String,
Expand Down

0 comments on commit f66cf9c

Please sign in to comment.