On Mon, Aug 5, 2024 at 6:55 AM G K <gku...@gmail.com> wrote:
>
>    I'm trying to create an HTTP rest api end where a POST method will be able 
> to accept and deserialize (unmarshall) a same data structre into numerous 
> instances. For the sake of example, lets say I have json struct:
> type Lock struct
> {
>    Key uint      `json:"key"`
> }
> Nom Im trying to post unspecified amount of keys. I tried defying the type as 
> a slice but unmarshall function would not work. Does anyone have any ideas 
> how to go about this?

Using a slice sounds like the right thing to do.  What exactly did you
try and what exactly happened?

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUOs8RsMey5jFHJT38DNKq6%3DALA55ghEyu2ryCa3dYg%2Bg%40mail.gmail.com.

Reply via email to