sjson icon indicating copy to clipboard operation
sjson copied to clipboard

consider using ScalaSigParser to fight type erasure

Open stephanos opened this issue 13 years ago • 7 comments

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?

stephanos avatar May 19 '11 07:05 stephanos

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.

debasishg avatar May 19 '11 07:05 debasishg

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 avatar May 19 '11 08:05 stephanos

oops, wrong button :-)

stephanos avatar May 19 '11 08:05 stephanos

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 .

ritschwumm avatar Nov 24 '11 15:11 ritschwumm

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 ..

debasishg avatar Nov 24 '11 16:11 debasishg

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

ikester avatar Dec 02 '11 16:12 ikester

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

debasishg avatar Dec 02 '11 22:12 debasishg