Skip to content

perf(go): remove JSON round trip from validation - #488

Open
raus7n wants to merge 1 commit into
razorpay:masterfrom
raus7n:perf/remove-go-validation-json-roundtrip
Open

raus7n wants to merge 1 commit into
razorpay:masterfrom
raus7n:perf/remove-go-validation-json-roundtrip

Conversation

@raus7n

@raus7n raus7n commented Sep 12, 2026

Copy link
Copy Markdown

Summary

Remove the unnecessary JSON marshal/unmarshal round trip from the Go IFSC validation path.

getData now normalizes the branch suffix directly and returns a Data value instead of serializing and deserializing it.

Why

The previous implementation performed JSON marshaling and unmarshaling during every validation call even though the input was already available as a string.

This change removes unnecessary serialization work and allocations while preserving existing validation behavior.

Testing

  • go test ./src/go -run Validate -v passes.
  • go test ./... still hits the existing TestLookUP/success nil-pointer panic on unmodified master, so that failure is unrelated to this change.

Test Case Document URL

Not added. The Tested label is not being used for this PR.

Signed-off-by: Raushan Kumar <raus7n@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant