Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Debug and Clone traits #4

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading