Skip to content

Comments

Make Data conform to Sequence#79

Open
marcprux wants to merge 1 commit intomainfrom
data-sequence
Open

Make Data conform to Sequence#79
marcprux wants to merge 1 commit intomainfrom
data-sequence

Conversation

@marcprux
Copy link
Member

@marcprux marcprux commented Sep 4, 2025

No description provided.

@cla-bot cla-bot bot added the cla-signed label Sep 4, 2025
@marcprux
Copy link
Member Author

From the test case failure, I think we need to change the logic of the JSON encoding/decoding to handle Data before Sequence.

testJSONCodable$SkipFoundation_debugUnitTest skip.lib.DecodingError$DataCorruptedCase
skip.lib.DecodingError$DataCorruptedCase
	at skip.lib.DecodingError$Companion.dataCorrupted(CodableSupport.kt:107)
	at skip.foundation.JSONDecoderImpl.unwrapData(JSONDecoder.kt:341)
	at skip.foundation.JSONDecoderImpl.unwrap$SkipFoundation_debug(JSONDecoder.kt:259)
	at skip.foundation.JSONKeyedDecodingContainer.decode(JSONDecoder.kt:590)
	at skip.lib.KeyedDecodingContainer.decode(Codable.kt:848)
	at skip.foundation.TestJSON$DataField.<init>(JSONTests.kt:393)
	at skip.foundation.TestJSON$DataField$Companion.init(JSONTests.kt:398)
	at skip.foundation.TestJSON$DataField$Companion.init(JSONTests.kt:396)
	at skip.foundation.JSONDecoderImpl.unwrap$SkipFoundation_debug(JSONDecoder.kt:270)
	at skip.foundation.JSONSingleValueDecodingContainer.decode(JSONDecoder.kt:439)
	at skip.lib.SingleValueDecodingContainer.decode(Codable.kt:1316)
	at skip.foundation.TestJSON$testJSONCodable$$inlined$roundtrip$default$65.invoke(Codable.kt:1423)
	at skip.foundation.TestJSON$testJSONCodable$$inlined$roundtrip$default$65.invoke(Codable.kt:1423)
	at skip.foundation.TestJSON.testJSONCodable$SkipFoundation_debugUnitTest(JSONTests.kt:2979)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant