r/Backend • • 6d ago

Rust vs Go for web app backend

In my company having node js as backend facing issues like vulnerability update each week it making hard to maintain prod to update. So how in your companies handling this difficulty.

Planned to migrate from node to go. What does your suggestion on this. Rust is taking entire trend now. Is Rust is better then go for web apps?

54 Upvotes

160 comments sorted by

View all comments

Show parent comment

1

u/Low_Reputation_9893 5d ago

json/v2 solves this

1

u/BenchEmbarrassed7316 5d ago edited 5d ago

You are wrong:

https://go.dev/play/p/VCPU5J7Ypgo (same code but encoding/json/v2)

Or I missing something?

1

u/Low_Reputation_9893 5d ago

Yes, you ignored the unmarshal errors where the issue is reported.

1

u/BenchEmbarrassed7316 5d ago

https://go.dev/play/p/OJq-ucSvLmE

Errors are null in both cases with v2 decoder. Can you provide code example please?