amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.57k stars 204 forks source link

Handle nested JSON and JSON arrays in params properly #1338

Open a-alhusaini opened 11 months ago

a-alhusaini commented 11 months ago

Before:

class SomeController
  def index
    params.validation { # ... }

    params["x"] # => string "[1,2,3]"
end

After

class SomeController
  def index
    params.validation { # ... }

    params["x"] # => Array(JSON::Any)
end