From e4fe46502d641a228ee4877d2a5a8443eb75f189 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 22 May 2017 14:13:23 +0100 Subject: [PATCH] JAL-2543 identify as JSON before HTML --- src/jalview/io/IdentifyFile.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 035c1fa..be0df21 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -274,6 +274,11 @@ public class IdentifyFile // read as a FASTA (probably) break; } + if (data.indexOf("{\"") > -1) + { + reply = FileFormat.Json; + break; + } int lessThan = data.indexOf("<"); if ((lessThan > -1)) // possible Markup Language data i.e HTML, // RNAML, XML @@ -291,11 +296,6 @@ public class IdentifyFile } } - if (data.indexOf("{\"") > -1) - { - reply = FileFormat.Json; - break; - } if ((data.length() < 1) || (data.indexOf("#") == 0)) { lineswereskipped = true; -- 1.7.10.2