debasishg / sjson

Scala Json with capabilities for Scala Object Serialization
http://debasishg.blogspot.com
226 stars 31 forks source link

consider using ScalaSigParser to fight type erasure #25

Open stephanos opened 13 years ago

stephanos commented 13 years ago

There is this project called 'Salat' here on Github that is able to serialize case classes without any 'help' from annotations. Have a look: https://github.com/novus/salat/wiki/Design

Maybe this mechanism could be build into sjson?

debasishg commented 13 years ago

Cool. Will look into it. Any idea where I can get some documentation on ScalaSigParser or I need to look into scalap source code .. Thanks for the suggestion.

stephanos commented 13 years ago

well on https://github.com/novus/salat under "Requires ScalaSig" the author of the library mentions something about it. I think the documentation is quite sparse, but I bet that by looking into the Salat source code it may become clear how to use it, that are the benefits of open source after all :-)

stephanos commented 13 years ago

oops, wrong button :-)

ritschwumm commented 12 years ago

salat afaik uses scalap and thus requires scala-compiler.jar in the classpath which i find a bit ugly. imho you better wait for scala 2.10's reflection api - or steal my code from https://github.com/ritschwumm/scjson/tree/master/src/main/scala/scjson/reflection .

debasishg commented 12 years ago

That's precisely the reason I have not started w/ scalap. Waiting for 2.10 is what I was looking at. But if I get it now, why not steal it. Will have a look over the weekend. Thanks a lot ..

ikester commented 12 years ago

Looking forward to seeing some experiments with ScalaSigParser!

It seems to be working fine for the Salat guys, mapping case classes to MongoDB objects: https://github.com/novus/salat

debasishg commented 12 years ago

I have seen it working in salat. I have plans too. Just need some time. Or maybe wait for 2.10 reflection apis ..