Closed fabianfett closed 4 years ago
I somewhat fail to see how this specific extensions are addressing the wider goal that was discussed in the linked issue #129 @fabianfett ? Tomer's comment https://github.com/swift-server/swift-aws-lambda-runtime/pull/129#issuecomment-652613419 outlines a somewhat wider effort than just the string coding functions -- i.e. by adding functions to the gateway handler, rather than just to specific JSON coder types.
What am I missing here?
Chatted some more; as I mentioned, not really strong opinion here so going to leave to @tomerd to decide if we're ok with these 👍
my only concern here is with extending public types from the SDK from which may conflict with other libraries if they do the same - we typically try to avoid doing so
@weissi wdyt?
my only concern here is with extending public types from the SDK from which may conflict with other libraries if they do the same - we typically try to avoid doing so
I don't want to steer the discussion in one direction and I'm sure you're aware, but let me mention for completeness, that we also extend the JSONEncoder
and JSONDecoder
for ByteBuffer
.
Motivation:
Little common denominator after a long discussion in #129:
JSONEncoder
andJSONDecoder
should have convenience methods to encode intoString
and decode fromString
.Result: