Hi I am struggling with creating object json which I will send with affjax post request. What is the easiest way to generate object Json, either from record or in place, I have values in function I just need to create object out of it.
I saw that there is possiblity to generate SingletonObject but how do you make object with 2 fields ? and also it feels a bit dirty. Cannot I define type Profile = {name :: String, password :: String} and simply convert record to Object json ?
I find agronout generics but I have no idea how to use them. I am quite confused so any would help me a lot.