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

support escaped chars (doesn't processed in actson) #14

Merged
merged 2 commits into from
Jan 2, 2025
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
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Changelog

## v0.3.0 (2025-01-02)

### Breaking Changes
- Process JSON escaped characters correctly in JSON parser
- Now properly handles all standard JSON escape sequences (`\"`, `\\`, `\/`, `\b`, `\f`, `\n`, `\r`, `\t`, `\uXXXX`)
- Fixed handling of Unicode escape sequences
- Improved error handling for invalid escape sequences

## v0.2.0 (2024-12-29)

### Changes
- Port [rack/query_parser.rb](https://github.com/rack/rack/blob/main/lib/rack/query_parser.rb) to make better compatible with rails/rack
- Port [rack/spec_utils.rb](https://github.com/rack/rack/blob/main/test/spec_utils.rb)
- Merge JSON with other structured data
- Rename `axum_params::ParamsValue` to `axum_params::Value`, doesn't need use it directly

## v0.1.0 (2024-12-25)

### Features

#### Unified Parameter Handling
- Path parameters
- Query parameters
- Form data
- Multipart form data
- JSON body
- All parameter types can be processed simultaneously
- Every parameter type supports structured data (arrays and objects)

#### Rails-like Tree-Structured Parameters
- Nested parameter handling similar to Rails' strong parameters
- Support for deeply nested structures with arrays and objects
- Files can be placed at any position in the parameter tree, e.g. `post[attachments][][file]`
- Seamlessly mix files with other data types in the same request
- Automatic parameter parsing and type conversion
- Handle complex forms with multiple file uploads in nested structures

Example structure:
```rust
post: {
title: String,
content: String,
tags: Vec<String>,
cover: UploadFile,
attachments: Vec<{
file: UploadFile,
description: String
}>
}
```
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "axum-params"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
license = "MIT"
description = "A Rails-like powerful parameter handling library for Axum"
Expand Down
Loading
Loading