Skip to content

Commit 7f12693

Browse files
committed
corrige verificação de caractere anterior ao inserir escape em JSON
1 parent 515b902 commit 7f12693

6 files changed

Lines changed: 16 additions & 14 deletions

File tree

‎VERSION.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.2
1+
0.9.3

‎valu3/Cargo.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "valu3"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
edition = "2021"
55
license = "Apache-2.0"
66
readme = "crates-io.md"
@@ -17,10 +17,10 @@ pest_derive = "2.7.15"
1717
regex = "1.11.1"
1818
chrono = "0.4.39"
1919
serde = { version = "1.0.216", features = ["derive"], optional = true }
20-
valu3-derive = { path = "../valu3_derive", optional = true, version = "0.9.2" }
20+
valu3-derive = { path = "../valu3_derive", optional = true, version = "0.9.3" }
2121

2222
[dev-dependencies]
23-
rand = "0.9.2"
23+
rand = "0.9.3"
2424
serde_json = "1.0.134"
2525

2626
[features]

‎valu3/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
Welcome to **Valu3** - the ultimate, flexible, and powerful library for manipulating diverse data types in your Rust projects. Say goodbye to the complexity of handling numbers, strings, arrays, objects, and datetime values. Valu3 is here to make your life easier!
44

55

6-
[![crates.io](https://img.shields.io/crates/v/valu3?label=0.9.2)](https://crates.io/crates/valu3)
7-
[![Documentation](https://docs.rs/valu3/badge.svg?version=0.9.2)](https://docs.rs/valu3/0.9.2)
6+
[![crates.io](https://img.shields.io/crates/v/valu3?label=0.9.3)](https://crates.io/crates/valu3)
7+
[![Documentation](https://docs.rs/valu3/badge.svg?version=0.9.3)](https://docs.rs/valu3/0.9.3)
88
![MSRV](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
99
![Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
10-
[![Dependency Status](https://deps.rs/crate/valu3/0.9.2/status.svg)](https://deps.rs/crate/valu3/0.9.2)
10+
[![Dependency Status](https://deps.rs/crate/valu3/0.9.3/status.svg)](https://deps.rs/crate/valu3/0.9.3)
1111
![Main test](https://github.com/lowcarboncode/valu3/actions/workflows/main-test.yml/badge.svg)
1212
[![codecov](https://codecov.io/gh/lowcarboncode/valu3/branch/master/graph/badge.svg)](https://codecov.io/gh/lowcarboncode/valu3)
1313
![downloads](https://img.shields.io/crates/d/valu3.svg)

‎valu3/src/to/json.rs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ impl Value {
9595
} else {
9696
let before = range.start - 1;
9797

98-
if list.get(before).unwrap().ne(r#"\"#) {
99-
result.insert(range.start + add_posi, r#"\"#.to_string());
100-
add_posi += 1;
98+
if let Some(prev_char) = list.get(before) {
99+
if prev_char.ne(r#"\"#) {
100+
result.insert(range.start + add_posi, r#"\"#.to_string());
101+
add_posi += 1;
102+
}
101103
}
102104
}
103105
}

‎valu3_derive/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "valu3-derive"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
edition = "2021"
55
license = "Apache-2.0"
66
readme = "crates-io.md"

‎valu3_derive/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
Welcome to **Valu3** - the ultimate, flexible, and powerful library for manipulating diverse data types in your Rust projects. Say goodbye to the complexity of handling numbers, strings, arrays, objects, and datetime values. Valu3 is here to make your life easier!
44

55

6-
[![crates.io](https://img.shields.io/crates/v/valu3?label=0.9.2)](https://crates.io/crates/valu3)
7-
[![Documentation](https://docs.rs/valu3/badge.svg?version=0.9.2)](https://docs.rs/valu3/0.9.2)
6+
[![crates.io](https://img.shields.io/crates/v/valu3?label=0.9.3)](https://crates.io/crates/valu3)
7+
[![Documentation](https://docs.rs/valu3/badge.svg?version=0.9.3)](https://docs.rs/valu3/0.9.3)
88
![MSRV](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
99
![Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
10-
[![Dependency Status](https://deps.rs/crate/valu3/0.9.2/status.svg)](https://deps.rs/crate/valu3/0.9.2)
10+
[![Dependency Status](https://deps.rs/crate/valu3/0.9.3/status.svg)](https://deps.rs/crate/valu3/0.9.3)
1111
![Main test](https://github.com/lowcarboncode/valu3/actions/workflows/main-test.yml/badge.svg)
1212
[![codecov](https://codecov.io/gh/lowcarboncode/valu3/branch/master/graph/badge.svg)](https://codecov.io/gh/lowcarboncode/valu3)
1313
![downloads](https://img.shields.io/crates/d/valu3.svg)

0 commit comments

Comments
 (0)