From e132b633f586281cfce7d4f1e71a41c96555e963 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Fri, 17 Jul 2015 11:59:50 -0500 Subject: [PATCH] Add map typespec for dialyzer This obviously only exists on VMs that support it. --- src/jiffy.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jiffy.erl b/src/jiffy.erl index c987997..4ee2a9e 100644 --- a/src/jiffy.erl +++ b/src/jiffy.erl @@ -23,6 +23,10 @@ -type json_number() :: integer() | float(). -type json_object() :: {[{json_string(),json_value()}]}. +-ifndef(JIFFY_NO_MAPS). +-type #{json_string() => json_value()}. +-endif. + -type jiffy_decode_result() :: json_value() | {has_trailer, json_value(), binary()}.