Skip to content

Commit

Permalink
[ANE-1233] Export lernie and modify serialization to match deserializ…
Browse files Browse the repository at this point in the history
…ation (#1336)

* export analyzeWithLernieMain for full file uploads

* modify serializing to match deserializing
  • Loading branch information
jagonalez authored Dec 1, 2023
1 parent dfa7085 commit 36db20f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/App/Fossa/Lernie/Analyze.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module App.Fossa.Lernie.Analyze (
analyzeWithLernie,
-- Exported for use in hubble
analyzeWithLernieMain,
-- Exported for testing
analyzeWithLernieWithOrgInfo,
singletonLernieMessage,
Expand Down
6 changes: 5 additions & 1 deletion src/App/Fossa/Lernie/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ data GrepEntry = GrepEntry
deriving (Eq, Ord, Show, Generic)

instance ToJSON GrepEntry where
toEncoding = genericToEncoding defaultOptions
toJSON (GrepEntry matchCriteria name) =
object
[ "matchCriteria" .= matchCriteria
, "name" .= name
]

instance FromJSON GrepEntry where
parseJSON = withObject "GrepEntry" $ \obj ->
Expand Down

0 comments on commit 36db20f

Please sign in to comment.