I’m trying to write a method to handle “Html.Event.on”
The first parameter is the method the second is a JSON Decoder.Decoder
I’m trying to work out what the string I will be decoding looks like, but I can’t get to it to print it.
I have to use a JSON.Decoder.Decoder. I was hoping t find one that just didn’t decode, so I could print the original string as is, then I’d know what I was looking for.
I’ve also tried decoding to a Value then Reencoding to String, since, But I think I was working under the assumption that Value would work something like it does in Rust, where Value is a kind of Enum, and I still needed to know what kind of Value I was expecting.
Is there a way to just get the original string out of a JSON.Decoder.Decoder
You could use Json.Decode.value to get the raw object, throw it over to your update in a temporary message, and then send it to a port where you can do console.log
Nevermind the simple answer solved my problems, I don’t understand how, looking it works underneath, but just using onInput with a String.toInt worked Thanks again