Packages
FaultTree is a library for performing [fault tree analysis](https://en.wikipedia.org/wiki/Fault_tree_analysis). It includes a small HTTP server capable of graphing the resulting FTA, or returning it as JSON.
Current section
Files
Jump to
Current section
Files
lib/poison/encoder.ex
defimpl Poison.Encoder, for: Decimal do
def encode(dec, options) do
dec
|> Decimal.to_string(:scientific)
|> Poison.Encoder.BitString.encode(options)
end
end
defimpl Poison.Encoder, for: Tuple do
def encode({k, n}, options) do
%{"k" => k, "n" => n}
|> Poison.Encoder.Map.encode(options)
end
end